mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
debug: track current debug message class
This is analog to current_msg_level. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
63f330761e
commit
e6655f0887
@ -161,6 +161,7 @@ static size_t debug_num_classes = 0;
|
||||
static struct debug_class *dbgc_config = debug_class_list_initial;
|
||||
|
||||
static int current_msg_level = 0;
|
||||
static int current_msg_class = 0;
|
||||
|
||||
#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD_JOURNAL) || defined(HAVE_LIBSYSTEMD)
|
||||
static int debug_level_to_priority(int level)
|
||||
@ -1401,6 +1402,9 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
|
||||
/* Set current_msg_level. */
|
||||
current_msg_level = level;
|
||||
|
||||
/* Set current message class */
|
||||
current_msg_class = cls;
|
||||
|
||||
/* Don't print a header if we're logging to stdout. */
|
||||
if ( state.logtype != DEBUG_FILE ) {
|
||||
return( true );
|
||||
|
Loading…
x
Reference in New Issue
Block a user