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
*/
#define DEBUGTAB(n) do_debug_tab(n)
-/** Possible destinations for the debug log */
+/** Possible destinations for the debug log (in order of precedence -
+ * once set to DEBUG_FILE, it is not possible to reset to DEBUG_STDOUT
+ * 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};
/**
*/
_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
dbf = x_stderr;
- setup_logging(argv[0], true);
+ setup_logging_stdout();
pc = poptGetContext("ndrdump", argc, argv, long_options, 0);
void debug_init(void);
void debug_register_msgs(struct messaging_context *msg_ctx);
void setup_logging(const char *pname, bool interactive);
+void setup_logging_stdout( void );
void debug_set_logfile(const char *name);
bool reopen_logs( void );
void force_check_log_size( void );
#endif
}
+/**
+ Just run logging to stdout for this program
+*/
+_PUBLIC_ void setup_logging_stdout(void)
+{
+ setup_logging(NULL, True);
+}
+
+
/***************************************************************************
Set the logfile name.
**************************************************************************/