]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
logger: Fix default console settings. 30/3930/2
authorCorey Farrell <git@cfware.com>
Tue, 20 Sep 2016 15:05:43 +0000 (11:05 -0400)
committerCorey Farrell <git@cfware.com>
Tue, 20 Sep 2016 16:50:43 +0000 (12:50 -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 14243523809e47ac2f3aa70b1f1764d43c29a2d1..802452e0b1949b6bec956ec639fbf7e0e6241343 100644 (file)
@@ -414,7 +414,7 @@ static int init_logger_chain(int locked, 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);
 
                if (!locked) {
                        AST_RWLIST_WRLOCK(&logchannels);