Christopher Browne cbbrowne at ca.afilias.info
Fri Jun 22 10:59:45 PDT 2007
The attached describes a set of changes I propose to make to the log
levels on the various slon_log() requests in the v2.0 branch.

The general idea is that I'm changing a lot of calls at levels
SLONY_DEBUG1, SLONY_DEBUG2, and such to report at SLONY_INFO and
SLONY_CONFIG levels.

The eventual goal is that people ought to be logging at -d 0, equivalent
to SLONY_INFO, and the logs should contain "enough interesting stuff" to
be useful to analyze, and that the higher levels (e.g. - DEBUG1 thru
DEBUG4) would only be used if one was specifically debugging a Slony-I
problem.

Comments/suggestions?
-------------- next part --------------
? splint.log
Index: cleanup_thread.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/cleanup_thread.c,v
retrieving revision 1.37
diff -c -u -r1.37 cleanup_thread.c
--- cleanup_thread.c	20 Apr 2007 20:53:18 -0000	1.37
+++ cleanup_thread.c	22 Jun 2007 17:53:16 -0000
@@ -78,7 +78,7 @@
 	int			vac_enable =3D SLON_VACUUM_FREQUENCY;
 	char	   *vacuum_action;
 =

-	slon_log(SLON_DEBUG1, "cleanupThread: thread starts\n");
+	slon_log(SLON_CONFIG, "cleanupThread: thread starts\n");
 =

 	/*
 	 * Want the vacuum time bias to be between 0 and 100 seconds, hence
@@ -88,7 +88,7 @@
 	{
 		vac_bias =3D rand() % (SLON_CLEANUP_SLEEP * 166);
 	}
-	slon_log(SLON_DEBUG4, "cleanupThread: bias =3D %d\n", vac_bias);
+	slon_log(SLON_CONFIG, "cleanupThread: bias =3D %d\n", vac_bias);
 =

 	/*
 	 * Connect to the local database
@@ -138,7 +138,7 @@
 		}
 		PQclear(res);
 		gettimeofday(&tv_end, NULL);
-		slon_log(SLON_DEBUG1,
+		slon_log(SLON_INFO,
 				 "cleanupThread: %8.3f seconds for cleanupEvent()\n",
 				 TIMEVAL_DIFF(&tv_start, &tv_end));
 =

@@ -218,7 +218,7 @@
 		}
 		PQclear(res);
 		gettimeofday(&tv_end, NULL);
-		slon_log(SLON_DEBUG1,
+		slon_log(SLON_INFO,
 				 "cleanupThread: %8.3f seconds for delete logs\n",
 				 TIMEVAL_DIFF(&tv_start, &tv_end));
 =

@@ -275,7 +275,7 @@
 			if (earliest_xid =3D=3D latest_xid)
 			{
 				=

-				slon_log(SLON_DEBUG4,
+				slon_log(SLON_INFO,
 					"cleanupThread: xid %d still active - analyze instead\n",
 					earliest_xid);
 			}
@@ -355,7 +355,7 @@
 				dstring_reset(&query3);
 			}
 			gettimeofday(&tv_end, NULL);
-			slon_log(SLON_DEBUG2,
+			slon_log(SLON_INFO,
 					 "cleanupThread: %8.3f seconds for vacuuming\n",
 					 TIMEVAL_DIFF(&tv_start, &tv_end));
 =

@@ -415,7 +415,7 @@
 		return (unsigned long) -1;
 	}
 	xid =3D strtoll(PQgetvalue(res, 0, 0), NULL, 10);
-	slon_log(SLON_DEBUG3, "cleanupThread: minxid: %d\n", xid);
+	slon_log(SLON_DEBUG1, "cleanupThread: minxid: %d\n", xid);
 	PQclear(res);
 	dstring_free(&query1);
 	return (unsigned long)xid;
Index: confoptions.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/confoptions.c,v
retrieving revision 1.23
diff -c -u -r1.23 confoptions.c
--- confoptions.c	20 Apr 2007 20:53:18 -0000	1.23
+++ confoptions.c	22 Jun 2007 17:53:16 -0000
@@ -450,7 +450,7 @@
 				}
 				else
 				{
-					slon_log(SLON_DEBUG2, "parameter \"%s\"\n", name);
+					slon_log(SLON_CONFIG, "parameter \"%s\"\n", name);
 				}
 =

 				*conf->variable =3D newval;
@@ -478,7 +478,7 @@
 				}
 				else
 				{
-					slon_log(SLON_DEBUG2, "parameter \"%s\"\n", name);
+					slon_log(SLON_CONFIG, "parameter \"%s\"\n", name);
 				}
 				*conf->variable =3D newval;
 				break;
@@ -506,7 +506,7 @@
 				}
 				else
 				{
-					slon_log(SLON_DEBUG2, "parameter \"%s\"\n", name);
+					slon_log(SLON_CONFIG, "parameter \"%s\"\n", name);
 				}
 				*conf->variable =3D newval;
 				break;
@@ -526,7 +526,7 @@
 				}
 				else
 				{
-					slon_log(SLON_DEBUG2, "parameter \"%s\"\n", name);
+					slon_log(SLON_CONFIG, "parameter \"%s\"\n", name);
 					free(newval);
 				}
 				*conf->variable =3D newval;
Index: dbutils.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/dbutils.c,v
retrieving revision 1.26
diff -c -u -r1.26 dbutils.c
--- dbutils.c	6 Dec 2006 09:48:19 -0000	1.26
+++ dbutils.c	22 Jun 2007 17:53:16 -0000
@@ -123,7 +123,7 @@
                 return NULL;
         }
 	=

-        slon_log(SLON_DEBUG4,
+        slon_log(SLON_CONFIG,
                 "version for \"%s\" is %d\n", conninfo, conn->pg_version);
 =

 	if (conn->pg_version >=3D 80100)
Index: local_listen.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/local_listen.c,v
retrieving revision 1.41
diff -c -u -r1.41 local_listen.c
--- local_listen.c	20 Apr 2007 20:53:18 -0000	1.41
+++ local_listen.c	22 Jun 2007 17:53:16 -0000
@@ -48,7 +48,7 @@
 	int			restart_request;
 	int poll_sleep =3D 0;
 =

-	slon_log(SLON_DEBUG1, "localListenThread: thread starts\n");
+	slon_log(SLON_INFO, "localListenThread: thread starts\n");
 =

 	/*
 	 * Connect to the local database
@@ -625,7 +625,7 @@
 				/*
 				 * Nothing to do locally
 				 */
-				slon_log(SLON_DEBUG2, "localListenThread: ACCEPT_SET");
+				slon_log(SLON_DEBUG1, "localListenThread: ACCEPT_SET");
 				rtcfg_reloadListen(dbconn);
 			}
 			else
@@ -699,7 +699,7 @@
 	conn =3D NULL;
 #endif
 =

-	slon_log(SLON_DEBUG1, "localListenThread: thread done\n");
+	slon_log(SLON_INFO, "localListenThread: thread done\n");
 	pthread_exit(NULL);
 }
 =

Index: remote_listen.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_listen.c,v
retrieving revision 1.35
diff -c -u -r1.35 remote_listen.c
--- remote_listen.c	20 Apr 2007 20:53:18 -0000	1.35
+++ remote_listen.c	22 Jun 2007 17:53:16 -0000
@@ -96,7 +96,7 @@
 =

 	PollState	oldpstate;
 =

-	slon_log(SLON_DEBUG1,
+	slon_log(SLON_INFO,
 			 "remoteListenThread_%d: thread starts\n",
 			 node->no_id);
 =

@@ -135,7 +135,7 @@
 				if (node->pa_conninfo =3D=3D NULL ||
 					strcmp(conn_conninfo, node->pa_conninfo) !=3D 0)
 				{
-					slon_log(SLON_DEBUG1,
+					slon_log(SLON_CONFIG,
 							 "remoteListenThread_%d: "
 							 "disconnecting from '%s'\n",
 							 node->no_id, conn_conninfo);
Index: remote_worker.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v
retrieving revision 1.145
diff -c -u -r1.145 remote_worker.c
--- remote_worker.c	19 Jun 2007 19:14:49 -0000	1.145
+++ remote_worker.c	22 Jun 2007 17:53:16 -0000
@@ -291,7 +291,7 @@
 	bool			event_ok;
 	bool			need_reloadListen =3D false;
 =

-	slon_log(SLON_DEBUG1,
+	slon_log(SLON_INFO,
 			 "remoteWorkerThread_%d: thread starts\n",
 			 node->no_id);
 =

@@ -985,7 +985,7 @@
 				char	   *wait_seqno;
 				PGresult   *res;
 =

-				slon_log(SLON_DEBUG2, "start processing ACCEPT_SET\n");
+				slon_log(SLON_DEBUG1, "start processing ACCEPT_SET\n");
 				set_id =3D (int)strtol(event->ev_data1, NULL, 10);
 				slon_log(SLON_DEBUG2, "ACCEPT: set=3D%d\n", set_id);
 				old_origin =3D (int)strtol(event->ev_data2, NULL, 10);
@@ -1008,7 +1008,7 @@
 =

 				if ((rtcfg_nodeid !=3D old_origin) && (rtcfg_nodeid !=3D new_origin))
 				{
-					slon_log(SLON_DEBUG2, "ACCEPT_SET - node not origin\n");
+					slon_log(SLON_DEBUG1, "ACCEPT_SET - node not origin\n");
 					(void) slon_mkquery(&query2,
 								 "select 1 from %s.sl_event "
 								 "where "
@@ -1033,14 +1033,14 @@
 					res =3D PQexec(local_dbconn, dstring_data(&query2));
 					while (PQntuples(res) =3D=3D 0)
 					{
-						slon_log(SLON_DEBUG2, "ACCEPT_SET - MOVE_SET or FAILOVER_SET not rec=
eived yet - sleep\n");
+						slon_log(SLON_DEBUG1, "ACCEPT_SET - MOVE_SET or FAILOVER_SET not rec=
eived yet - sleep\n");
 						if (sched_msleep(node, 10000) !=3D SCHED_STATUS_OK)
 							slon_retry();
 						PQclear(res);
 						res =3D PQexec(local_dbconn, dstring_data(&query2));
 					}
 					PQclear(res);
-					slon_log(SLON_DEBUG2, "ACCEPT_SET - MOVE_SET or FAILOVER_SET exists -=
 adjusting setsync status\n");
+					slon_log(SLON_DEBUG1, "ACCEPT_SET - MOVE_SET or FAILOVER_SET exists -=
 adjusting setsync status\n");
 =

 					/*
 					 * Finalize the setsync status to mave the ACCEPT_SET's
@@ -1072,7 +1072,7 @@
 					query_append_event(&query1, event);
 					slon_appendquery(&query1, "commit transaction;");
 					query_execute(node, local_dbconn, &query1);
-					slon_log(SLON_DEBUG2, "ACCEPT_SET - done\n");
+					slon_log(SLON_DEBUG1, "ACCEPT_SET - done\n");
 					archive_close(node);
 					slon_retry();
 =

@@ -1080,7 +1080,7 @@
 				}
 				else
 				{
-					slon_log(SLON_DEBUG2, "ACCEPT_SET - on origin node...\n");
+					slon_log(SLON_DEBUG1, "ACCEPT_SET - on origin node...\n");
 				}
 =

 			}
@@ -1470,7 +1470,7 @@
 #endif
 	free(wd);
 =

-	slon_log(SLON_DEBUG1,
+	slon_log(SLON_INFO,
 			 "remoteWorkerThread_%d: thread done\n",
 			 node->no_id);
 	pthread_exit(NULL);
@@ -1491,7 +1491,7 @@
 	SlonSet    *rtcfg_set;
 	int			i;
 =

-	slon_log(SLON_DEBUG4, "remoteWorkerThread_%d: "
+	slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 			 "update provider configuration\n",
 			 node->no_id);
 =

@@ -1584,7 +1584,7 @@
 								 node->no_id, strerror(errno));
 						slon_retry();
 					}
-					slon_log(SLON_DEBUG1, "remoteWorkerThread_%d: "
+					slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 							 "helper thread for provider %d created\n",
 							 node->no_id, provider->no_id);
 =

@@ -1636,7 +1636,7 @@
 				DLLIST_ADD_TAIL(provider->set_head,
 								provider->set_tail, pset);
 =

-				slon_log(SLON_DEBUG4, "remoteWorkerThread_%d: "
+				slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 						 "added active set %d to provider %d\n",
 						 node->no_id, pset->set_id, provider->no_id);
 			}
@@ -1671,7 +1671,7 @@
 			pthread_cond_destroy(&(provider->helper_cond));
 			pthread_mutex_destroy(&(provider->helper_lock));
 =

-			slon_log(SLON_DEBUG1, "remoteWorkerThread_%d: "
+			slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 					 "helper thread for provider %d terminated\n",
 					 node->no_id, provider->no_id);
 =

@@ -1699,7 +1699,7 @@
 			 */
 			if (provider->conn !=3D NULL)
 			{
-				slon_log(SLON_DEBUG1, "remoteWorkerThread_%d: "
+				slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 						 "disconnecting from data provider %d\n",
 						 node->no_id, provider->no_id);
 				slon_disconnectdb(provider->conn);
@@ -1732,7 +1732,7 @@
 		{
 			if (provider->conn !=3D NULL)
 			{
-				slon_log(SLON_DEBUG1, "remoteWorkerThread_%d: "
+				slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 						 "disconnecting from data provider %d\n",
 						 node->no_id, provider->no_id);
 				slon_disconnectdb(provider->conn);
@@ -1795,7 +1795,7 @@
 	 */
 	if (sched_get_status() !=3D SCHED_STATUS_OK)
 	{
-		slon_log(SLON_DEBUG2,
+		slon_log(SLON_DEBUG1,
 				 "remoteWorker_event: ignore new events due to shutdown\n");
 		return;
 	}
@@ -1979,7 +1979,7 @@
 	if (node =3D=3D NULL)
 	{
 		rtcfg_unlock();
-		slon_log(SLON_DEBUG2,
+		slon_log(SLON_DEBUG1,
 				 "remoteWorker_wakeup: unknown node %d\n",
 				 no_id);
 		return;
@@ -2377,7 +2377,7 @@
 	struct timeval tv_start2;
 	struct timeval tv_now;
 =

-	slon_log(SLON_DEBUG1, "copy_set %d\n", set_id);
+	slon_log(SLON_INFO, "copy_set %d\n", set_id);
 	gettimeofday(&tv_start, NULL);
 =

 	/*
@@ -2434,7 +2434,7 @@
 	}
 	free(conninfo);
 	conninfo =3D NULL;
-	slon_log(SLON_DEBUG1, "remoteWorkerThread_%d: "
+	slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 			 "connected to provider DB\n",
 			 node->no_id);
 =

@@ -2589,7 +2589,7 @@
 		char	   *tab_fqname =3D PQgetvalue(res1, tupno1, 1);
 =

 		gettimeofday(&tv_start2, NULL);
-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 				 "prepare to copy table %s\n",
 				 node->no_id, tab_fqname);
 =

@@ -2633,7 +2633,7 @@
 	}
 	PQclear(res1);
 =

-	slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+	slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 			 "all tables for set %d found on subscriber\n",
 			 node->no_id, set_id);
 =

@@ -2678,7 +2678,7 @@
 		char	   *seq_fqname =3D PQgetvalue(res1, tupno1, 1);
 		char	   *seq_comment =3D PQgetvalue(res1, tupno1, 2);
 =

-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 				 "copy sequence %s\n",
 				 node->no_id, seq_fqname);
 =

@@ -2751,7 +2751,7 @@
 		int64		copysize =3D 0;
 =

 		gettimeofday(&tv_start2, NULL);
-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 				 "copy table %s\n",
 				 node->no_id, tab_fqname);
 =

@@ -2827,7 +2827,7 @@
 		/*
 		 * Begin a COPY from stdin for the table on the local DB
 		 */
-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 				 "Begin COPY of table %s\n",
 				 node->no_id, tab_fqname);
 =

@@ -3083,7 +3083,7 @@
 		}
 =

 		PQclear(res2);
-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 				 INT64_FORMAT " bytes copied for table %s\n",
 				 node->no_id, copysize, tab_fqname);
 =

@@ -3115,7 +3115,7 @@
 		}
 =

 		gettimeofday(&tv_now, NULL);
-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 				 "%.3f seconds to copy table %s\n",
 				 node->no_id,
 				 TIMEVAL_DIFF(&tv_start2, &tv_now), tab_fqname);
@@ -3169,7 +3169,7 @@
 		char	   *seql_last_value =3D PQgetvalue(res1, tupno1, 1);
 		char	   *seq_fqname =3D PQgetvalue(res1, tupno1, 2);
 =

-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_CONFIG, "remoteWorkerThread_%d: "
 				 "set last_value of sequence %s (%s) to %s\n",
 				 node->no_id, seql_seqid, seq_fqname, seql_last_value);
 =

@@ -3220,7 +3220,7 @@
 	if (ntuples1 > 0)
 	{
 		gettimeofday(&tv_now, NULL);
-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_INFO, "remoteWorkerThread_%d: "
 				 "%.3f seconds to copy sequences\n",
 				 node->no_id,
 				 TIMEVAL_DIFF(&tv_start2, &tv_now));
@@ -3288,7 +3288,7 @@
 			ssy_maxxid =3D event->ev_maxxid_c;
 			ssy_xip =3D event->ev_xip;
 =

-			slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+			slon_log(SLON_INFO, "remoteWorkerThread_%d: "
 					 "copy_set no previous SYNC found, use enable event.\n",
 					 node->no_id);
 =

@@ -3356,7 +3356,7 @@
 			else
 				slon_appendquery(&query2, ")");
 =

-			slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+			slon_log(SLON_INFO, "remoteWorkerThread_%d: "
 					 "copy_set SYNC found, use event seqno %s.\n",
 					 node->no_id, ssy_seqno);
 =

@@ -3510,7 +3510,7 @@
 	}
 	PQclear(res1);
 	gettimeofday(&tv_now, NULL);
-	slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+	slon_log(SLON_INFO, "remoteWorkerThread_%d: "
 			 "%.3f seconds to build initial setsync status\n",
 			 node->no_id,
 			 TIMEVAL_DIFF(&tv_start2, &tv_now));
@@ -3543,7 +3543,7 @@
 			 node->no_id);
 =

 	gettimeofday(&tv_now, NULL);
-	slon_log(SLON_DEBUG1, "copy_set %d done in %.3f seconds\n", set_id,
+	slon_log(SLON_INFO, "copy_set %d done in %.3f seconds\n", set_id,
 			 TIMEVAL_DIFF(&tv_start, &tv_now));
 	return 0;
 }
@@ -3713,7 +3713,7 @@
 				archive_terminate(node);
 				return 10;
 			}
-			slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+			slon_log(SLON_DEBUG1, "remoteWorkerThread_%d: "
 					 "data provider %d confirmed up to "
 					 "ev_seqno %s for ev_origin %d - OK\n",
 					 node->no_id, provider->no_id,
@@ -3840,7 +3840,7 @@
 				return 60;
 			}
 			ntuples2 =3D PQntuples(res2);
-			slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+			slon_log(SLON_INFO, "remoteWorkerThread_%d: "
 					 "syncing set %d with %d table(s) from provider %d\n",
 					 node->no_id, sub_set, ntuples2,
 					 provider->no_id);
@@ -4014,7 +4014,7 @@
 	 */
 	if (num_sets =3D=3D 0)
 	{
-		slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: "
+		slon_log(SLON_DEBUG1, "remoteWorkerThread_%d: "
 				 "no sets need syncing for this event\n",
 				 node->no_id);
 		dstring_free(&query);
@@ -4258,7 +4258,7 @@
 		pthread_mutex_unlock(&(provider->helper_lock));
 	}
 =

-	slon_log(SLON_DEBUG4, "remoteWorkerThread_%d: cleanup\n",
+	slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: cleanup\n",
 			 node->no_id);
 =

 	/*
@@ -4425,7 +4425,7 @@
 		if (command_on_logarchive) {
 			char command[512];
 			sprintf(command, "%s %s", command_on_logarchive, node->archive_name);
-			slon_log(SLON_INFO, "remoteWorkerThread_%d: Run Archive Command %s\n",
+			slon_log(SLON_DEBUG1, "remoteWorkerThread_%d: Run Archive Command %s\n",
 				 node->no_id, command);
 			system(command);
 		}
@@ -4437,7 +4437,7 @@
 	dstring_free(&query);
 	dstring_free(&lsquery);
 	gettimeofday(&tv_now, NULL);
-	slon_log(SLON_DEBUG2, "remoteWorkerThread_%d: SYNC "
+	slon_log(SLON_INFO, "remoteWorkerThread_%d: SYNC "
 			 INT64_FORMAT " done in %.3f seconds\n",
 			 node->no_id, event->ev_seqno,
 			 TIMEVAL_DIFF(&tv_start, &tv_now));
@@ -4804,7 +4804,7 @@
 					if (first_fetch)
 					{
 						gettimeofday(&tv_now, NULL);
-						slon_log(SLON_DEBUG2,
+						slon_log(SLON_DEBUG1,
 								 "remoteHelperThread_%d_%d: %.3f seconds delay for first row\n",
 								 node->no_id, provider->no_id,
 								 TIMEVAL_DIFF(&tv_start, &tv_now));
@@ -5051,12 +5051,12 @@
 			errors++;
 =

 		gettimeofday(&tv_now, NULL);
-		slon_log(SLON_DEBUG2,
+		slon_log(SLON_DEBUG1,
 			   "remoteHelperThread_%d_%d: %.3f seconds until close cursor\n",
 				 node->no_id, provider->no_id,
 				 TIMEVAL_DIFF(&tv_start, &tv_now));
 =

-		slon_log(SLON_DEBUG2, "remoteHelperThread_%d_%d: inserts=3D%d updates=3D=
%d deletes=3D%d\n",
+		slon_log(SLON_INFO, "remoteHelperThread_%d_%d: inserts=3D%d updates=3D%d=
 deletes=3D%d\n",
 			 node->no_id, provider->no_id, num_inserts, num_updates, num_deletes);
 =

 		num_inserts =3D 0;
Index: slon.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/slon.c,v
retrieving revision 1.73
diff -c -u -r1.73 slon.c
--- slon.c	14 Jun 2007 14:58:54 -0000	1.73
+++ slon.c	22 Jun 2007 17:53:16 -0000
@@ -455,7 +455,7 @@
 	}
 #endif
 =

-	slon_log(SLON_DEBUG2, "main: main process started\n");
+	slon_log(SLON_INFO, "main: main process started\n");
 =

 	/*
 	 * Start the event scheduling system
@@ -783,7 +783,7 @@
 #if !defined(CYGWIN) && !defined(WIN32)
 	struct sigaction act;
 #endif
-	slon_log(SLON_DEBUG2, "slon: watchdog process started\n");
+	slon_log(SLON_INFO, "slon: watchdog process started\n");
 =

 	/*
 	 * Install signal handlers
@@ -833,7 +833,7 @@
 		slon_exit(-1);
 	}
 =

-	slon_log(SLON_DEBUG2, "slon: watchdog ready - pid =3D %d\n", slon_watchdo=
g_pid);
+	slon_log(SLON_CONFIG, "slon: watchdog ready - pid =3D %d\n", slon_watchdo=
g_pid);
 =

 	slon_worker_pid =3D fork();
 	if (slon_worker_pid =3D=3D 0)
@@ -842,7 +842,7 @@
 		exit(-1);
 	}
 =

-	slon_log(SLON_DEBUG2, "slon: worker process created - pid =3D %d\n",
+	slon_log(SLON_CONFIG, "slon: worker process created - pid =3D %d\n",
 			 slon_worker_pid);
 	while ((pid =3D wait(&child_status)) !=3D slon_worker_pid)
 	{
@@ -977,11 +977,11 @@
 =

 	if (pid_file)
 	{
-		slon_log(SLON_DEBUG2, "slon: remove pid file\n");
+		slon_log(SLON_INFO, "slon: remove pid file\n");
 		(void) unlink(pid_file);
 	}
 =

-	slon_log(SLON_DEBUG2, "slon: exit(%d)\n", code);
+	slon_log(SLON_INFO, "slon: exit(%d)\n", code);
 =

 	exit(code);
 }
Index: sync_thread.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/cvsd/slony1/slony1-engine/src/slon/sync_thread.c,v
retrieving revision 1.19
diff -c -u -r1.19 sync_thread.c
--- sync_thread.c	14 Mar 2007 15:59:32 -0000	1.19
+++ sync_thread.c	22 Jun 2007 17:53:17 -0000
@@ -52,7 +52,7 @@
 	int			timeout_count;
 	bool first_time =3D TRUE;
 =

-	slon_log(SLON_DEBUG1,
+	slon_log(SLON_INFO,
 			 "syncThread: thread starts\n");
 =

 	/*
@@ -194,7 +194,7 @@
 	dstring_free(&query3);
 	slon_disconnectdb(conn);
 =

-	slon_log(SLON_DEBUG1, "syncThread: thread done\n");
+	slon_log(SLON_INFO, "syncThread: thread done\n");
 	pthread_exit(NULL);
 }
=20


More information about the Slony1-patches mailing list