lib/util Remove setup_logging_stdout()
authorAndrew Bartlett <abartlet@samba.org>
Fri, 29 Oct 2010 04:00:01 +0000 (15:00 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 1 Nov 2010 23:34:06 +0000 (23:34 +0000)
This API is no longer required now that we don't attempt to build ndrdump
with the s3 build system, and because the s3 debug system will soon have the
same setup_logging() API.

Andrew Bartlett

lib/util/debug.c
lib/util/debug.h
librpc/tools/ndrdump.c

index c8a22149a28baa6ae0dd1fd6c347899e9a132cba..055dfbb12e1a846551df7cd1c524b7f03fdd06c6 100644 (file)
@@ -37,7 +37,6 @@ static int debug_all_class_hack = 1;
 int *DEBUGLEVEL_CLASS = &debug_all_class_hack; /* For samba 3 */
 static bool debug_all_class_isset_hack = true;
 bool    *DEBUGLEVEL_CLASS_ISSET = &debug_all_class_isset_hack; /* For samba 3 */
 int *DEBUGLEVEL_CLASS = &debug_all_class_hack; /* For samba 3 */
 static bool debug_all_class_isset_hack = true;
 bool    *DEBUGLEVEL_CLASS_ISSET = &debug_all_class_isset_hack; /* For samba 3 */
-XFILE *dbf = NULL; /* For Samba 3*/
 
 /* the registered mutex handlers */
 static struct {
 
 /* the registered mutex handlers */
 static struct {
@@ -209,14 +208,6 @@ _PUBLIC_ void setup_logging(const char *prog_name, enum debug_logtype new_logtyp
        reopen_logs();
 }
 
        reopen_logs();
 }
 
-/**
-   Just run logging to stdout for this program 
-*/
-_PUBLIC_ void setup_logging_stdout(void)
-{
-       setup_logging(NULL, DEBUG_STDOUT);
-}
-
 /**
   return a string constant containing n tabs
   no more than 10 tabs are returned
 /**
   return a string constant containing n tabs
   no more than 10 tabs are returned
index 0172df8efe553ed9de81e474366287e95280db2f..a62db1a38751a523a6817b283f3e74e94b307fce 100644 (file)
@@ -79,7 +79,7 @@ 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 */
  * 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_STDOUT = 0, DEBUG_FILE = 1, DEBUG_STDERR = 2};
+enum debug_logtype {DEBUG_DEFAULT_STDERR = 0, DEBUG_STDOUT = 1, DEBUG_FILE = 2, DEBUG_STDERR = 3};
 
 /**
   the backend for debug messages. Note that the DEBUG() macro has already
 
 /**
   the backend for debug messages. Note that the DEBUG() macro has already
@@ -105,11 +105,6 @@ _PUBLIC_ void debug_schedule_reopen_logs(void);
 */
 _PUBLIC_ void setup_logging(const char *prog_name, enum debug_logtype new_logtype);
 
 */
 _PUBLIC_ void setup_logging(const char *prog_name, enum debug_logtype new_logtype);
 
-/**
-   Just run logging to stdout for this program 
-*/
-_PUBLIC_ void setup_logging_stdout(void);
-
 /**
   return a string constant containing n tabs
   no more than 10 tabs are returned
 /**
   return a string constant containing n tabs
   no more than 10 tabs are returned
index b9b4bc7fd6bc3762aa64ee28adb2ccd853d0e5de..f0f4eaff4e62d9910e78c8cf3310d6487cefa470 100644 (file)
@@ -180,7 +180,7 @@ static void ndrdump_data(uint8_t *d, uint32_t l, bool force)
 
        setlinebuf(stdout);
 
 
        setlinebuf(stdout);
 
-       setup_logging_stdout();
+       setup_logging("ndrdump", DEBUG_STDOUT);
 
        pc = poptGetContext("ndrdump", argc, argv, long_options, 0);
        
 
        pc = poptGetContext("ndrdump", argc, argv, long_options, 0);