diff options
author | Corey Farrell <git@cfware.com> | 2016-09-20 10:22:45 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2016-09-20 13:03:40 -0400 |
commit | 00f1d05d34219f5cb0fc29032a928c3919924d62 (patch) | |
tree | 3f427bbaad80ff3661934aa81966faf971bb5af5 /main/logger.c | |
parent | 74f562a8e2da5acdcde12d58f41e231962236ef9 (diff) |
logger: Always enable verbose for console channel.
Previous versions of Asterisk did not require verbose to be specified in
logger.conf for the console channel, if it was requested by command line
or asterisk.conf it just worked. This change causes Asterisk to always
enable verbose in the console channel level mask. Verbose is displayed
on consoles if requested by command line, option_verbose or 'core set
verbose'.
This also delays initialization of the logger until after threadstorage
is initialized. Initializing too early can cause messages to be printed
multiple times to the console (stdout).
ASTERISK-26391 #close
Change-Id: I52187d67c2fcb3efd5561bf04b3e5e23e5ee8a04
Diffstat (limited to 'main/logger.c')
-rw-r--r-- | main/logger.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/logger.c b/main/logger.c index db3d7a730..315de9f23 100644 --- a/main/logger.c +++ b/main/logger.c @@ -479,6 +479,7 @@ static void make_components(struct logchannel *chan) * with calculating the ast_verb_sys_level value. */ chan->verbosity = -1; + logmask |= (1 << __LOG_VERBOSE); } else { chan->verbosity = verb_level; } @@ -663,7 +664,8 @@ static int init_logger_chain(const char *altconf) return -1; } chan->type = LOGTYPE_CONSOLE; - chan->logmask = (1 << __LOG_WARNING) | (1 << __LOG_NOTICE) | (1 << __LOG_ERROR); + chan->logmask = (1 << __LOG_WARNING) | (1 << __LOG_NOTICE) | (1 << __LOG_ERROR) + | (1 << __LOG_VERBOSE); memcpy(&chan->formatter, &logformatter_default, sizeof(chan->formatter)); AST_RWLIST_INSERT_HEAD(&logchannels, chan, list); |