I've added a test for lp_loaded() so that timestamps *will* be output
authorChristopher R. Hertel <crh@samba.org>
Tue, 11 Aug 1998 15:47:26 +0000 (15:47 +0000)
committerChristopher R. Hertel <crh@samba.org>
Tue, 11 Aug 1998 15:47:26 +0000 (15:47 +0000)
before the config file has been loaded.  Otherwise the default is no
timestamp.

Chris -)-----
(This used to be commit fd7eaed59efbe2ce6998d5902e70d79f533b3372)

source3/lib/debug.c

index 8f7887006f3955d33c98d3aa9d3656f78f2f7d8d..e234084d98f7810c588a181541e2ea8a5a3cbbfb 100644 (file)
@@ -476,10 +476,15 @@ BOOL dbghdr( int level, char *file, char *func, int line )
   if( stdout_logging )
     return( True );
 
-  /* Print it all out at once. */
-  if(lp_timestamp_logs())
-    Debug1( "[%s, %d] %s%s%s(%d)\n",
-            timestring(), level, file, (*file)?":":"", func, line );
+  /* Print the header if timestamps are turned on.  If parameters are
+   * not yet loaded, then default to timestamps on.
+   */
+  if( lp_timestamp_logs() || !(lp_loaded()) )
+    {
+    /* Print it all out at once to prevent split syslog output. */
+    Debug1( "[%s, %d] %s:%s(%d)\n", timestring(), level, file, func, line );
+    }
+
   return( True );
   } /* dbghdr */