summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>1998-08-11 15:47:26 +0000
committerChristopher R. Hertel <crh@samba.org>1998-08-11 15:47:26 +0000
commit6a9170b1ae8685e8b84325911123fd73c062d685 (patch)
treeec1fed87b6e6eaf9c0959b9b2f5d052d62a56a35 /source3
parentab1bfe5b0d9795d3e7d993ac5247f1be63950353 (diff)
downloadsamba-6a9170b1ae8685e8b84325911123fd73c062d685.tar.gz
samba-6a9170b1ae8685e8b84325911123fd73c062d685.tar.bz2
samba-6a9170b1ae8685e8b84325911123fd73c062d685.zip
I've added a test for lp_loaded() so that timestamps *will* be output
before the config file has been loaded. Otherwise the default is no timestamp. Chris -)----- (This used to be commit fd7eaed59efbe2ce6998d5902e70d79f533b3372)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/debug.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 8f7887006f..e234084d98 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -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 */