logger: Fix default console settings.
authorCorey Farrell <git@cfware.com>
Tue, 20 Sep 2016 15:16:42 +0000 (11:16 -0400)
committerCorey Farrell <git@cfware.com>
Tue, 20 Sep 2016 17:03:19 +0000 (13:03 -0400)
When logger.conf is missing or invalid we should be printing notices,
warnings and errors to the console.  The logmask was incorrectly
calculated.

Change-Id: Ibaa9465a8682854bc1a5e9ba07079bea1bfb6bb3

main/logger.c

index 9a16dcf..db3d7a7 100644 (file)
@@ -663,7 +663,7 @@ static int init_logger_chain(const char *altconf)
                        return -1;
                }
                chan->type = LOGTYPE_CONSOLE;
-               chan->logmask = __LOG_WARNING | __LOG_NOTICE | __LOG_ERROR;
+               chan->logmask = (1 << __LOG_WARNING) | (1 << __LOG_NOTICE) | (1 << __LOG_ERROR);
                memcpy(&chan->formatter, &logformatter_default, sizeof(chan->formatter));
 
                AST_RWLIST_INSERT_HEAD(&logchannels, chan, list);