mirror of
https://github.com/samba-team/samba.git
synced 2025-03-30 06:50:24 +03:00
debug Explain the behaviour of setup_logging() more clearly
This commit is contained in:
parent
4aeb608eca
commit
db2a61ab26
@ -190,7 +190,13 @@ void debug_setup_talloc_log(void)
|
||||
|
||||
/**
|
||||
control the name of the logfile and whether logging will be to stdout, stderr
|
||||
or a file
|
||||
or a file, and set up syslog
|
||||
|
||||
new_log indicates the destination for the debug log (an enum 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
|
||||
*/
|
||||
_PUBLIC_ void setup_logging(const char *prog_name, enum debug_logtype new_logtype)
|
||||
{
|
||||
|
@ -248,8 +248,11 @@ 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 */
|
||||
/** 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_DEFAULT_STDERR = 0, DEBUG_STDOUT = 1, DEBUG_FILE = 2, DEBUG_STDERR = 3};
|
||||
|
||||
void setup_logging(const char *prog_name, enum debug_logtype new_logtype);
|
||||
|
@ -564,6 +564,12 @@ void debug_register_msgs(struct messaging_context *msg_ctx)
|
||||
/**
|
||||
control the name of the logfile and whether logging will be to stdout, stderr
|
||||
or a file, and set up syslog
|
||||
|
||||
new_log indicates the destination for the debug log (an enum 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
|
||||
*/
|
||||
void setup_logging(const char *prog_name, enum debug_logtype new_logtype)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user