summaryrefslogtreecommitdiff
path: root/source3/include/debug.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-10-29 14:19:32 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-02 04:36:04 +0000
commit9da4ace1d9789d300ab298bc34694c44b2062f30 (patch)
tree0c4ce1fa4f3a97934c9504263fdfc86a28e39705 /source3/include/debug.h
parent4ae27891f8ac0a56d68b0544e78d6c17ade0c1c9 (diff)
downloadsamba-9da4ace1d9789d300ab298bc34694c44b2062f30.tar.gz
samba-9da4ace1d9789d300ab298bc34694c44b2062f30.tar.bz2
samba-9da4ace1d9789d300ab298bc34694c44b2062f30.zip
s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which wish to set up logging to stderr can simply ask for it, rather than directly modify the dbf global variable. Andrew Bartlett
Diffstat (limited to 'source3/include/debug.h')
-rw-r--r--source3/include/debug.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/include/debug.h b/source3/include/debug.h
index 467fb2f122..6f7baec461 100644
--- a/source3/include/debug.h
+++ b/source3/include/debug.h
@@ -59,8 +59,6 @@ bool dbghdr( int level, const char *location, const char *func);
#pragma mips_frequency_hint NEVER dbghdr
#endif
-extern XFILE *dbf;
-
/* If we have these macros, we can add additional info to the header. */
#ifdef HAVE_FUNCTION_MACRO
@@ -250,6 +248,13 @@ extern bool *DEBUGLEVEL_CLASS_ISSET;
/* The following definitions come from lib/debug.c */
+/* Possible destinations for the debug log (in order of precedence,
+ * only a higher value will override a lower value */
+enum debug_logtype {DEBUG_DEFAULT_STDERR = 0, DEBUG_STDOUT = 1, DEBUG_FILE = 2, DEBUG_STDERR = 3};
+
+void setup_logging(const char *prog_name, enum debug_logtype new_logtype);
+
+void debug_close_dbf(void);
void gfree_debugsyms(void);
const char *debug_classname_from_index(int ndx);
int debug_add_class(const char *classname);
@@ -258,8 +263,6 @@ bool debug_parse_levels(const char *params_str);
void debug_message(struct messaging_context *msg_ctx, void *private_data, uint32_t msg_type, struct server_id src, DATA_BLOB *data);
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 );
@@ -270,3 +273,4 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func);
bool dbghdr(int level, const char *location, const char *func);
#endif
+