debug: fixed default debug settings
authorAndrew Tridgell <tridge@samba.org>
Wed, 3 Nov 2010 23:25:30 +0000 (10:25 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 4 Nov 2010 01:48:15 +0000 (01:48 +0000)
this fixes -d in our command line tools (eg. samba-tool)

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Nov  4 01:48:15 UTC 2010 on sn-devel-104

lib/util/debug.c
lib/util/debug.h

index 54e7a5fcf6b9d0833f57f247ee0f76df21f297b4..789abe19c2a1dcaed1652d658c74f25f4f5003ab 100644 (file)
@@ -141,10 +141,12 @@ _PUBLIC_ void reopen_logs(void)
 
        switch (state.logtype) {
        case DEBUG_STDOUT:
+       case DEBUG_DEFAULT_STDOUT:
                state.fd = 1;
                break;
 
        case DEBUG_STDERR:
+       case DEBUG_DEFAULT_STDERR:
                state.fd = 2;
                break;
 
index a62db1a38751a523a6817b283f3e74e94b307fce..055edcb3c4bac3ba121a364af01878a67b2e73c5 100644 (file)
@@ -79,7 +79,11 @@ extern int DEBUGLEVEL;
  * for example.  This makes it easy to override for debug to stderr on
  * the command line, as the smb.conf cannot reset it back to
  * file-based logging */
-enum debug_logtype {DEBUG_DEFAULT_STDERR = 0, DEBUG_STDOUT = 1, DEBUG_FILE = 2, DEBUG_STDERR = 3};
+enum debug_logtype {DEBUG_DEFAULT_STDOUT = 0, 
+                   DEBUG_DEFAULT_STDERR, 
+                   DEBUG_STDOUT, 
+                   DEBUG_FILE, 
+                   DEBUG_STDERR};
 
 /**
   the backend for debug messages. Note that the DEBUG() macro has already