don't put two spaces at the start of lines if logging to stdout
authorAndrew Tridgell <tridge@samba.org>
Sun, 30 Aug 1998 05:57:21 +0000 (05:57 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 30 Aug 1998 05:57:21 +0000 (05:57 +0000)
or not timestamping.

source/lib/debug.c

index 6469a3ca6ca76910498ca779defd1427e45f1218..c20229fcdebcc4c52f229c23903741dd989af384 100644 (file)
@@ -427,11 +427,13 @@ static void bufr_print( void )
 static void format_debug_text( char *msg )
   {
   int i;
 static void format_debug_text( char *msg )
   {
   int i;
+  BOOL timestamp = (!stdout_logging && (lp_timestamp_logs() || 
+                                       !(lp_loaded())));
 
   for( i = 0; msg[i]; i++ )
     {
     /* Indent two spaces at each new line. */
 
   for( i = 0; msg[i]; i++ )
     {
     /* Indent two spaces at each new line. */
-    if( 0 == format_pos )
+    if(timestamp && 0 == format_pos)
       {
       format_bufr[0] = format_bufr[1] = ' ';
       format_pos = 2;
       {
       format_bufr[0] = format_bufr[1] = ' ';
       format_pos = 2;