]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
logger: Fix default console settings. 31/3931/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 17:01:57 +0000 (12:01 -0500)
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 a70b6d15eb3279441d30af55787c2d7c377060e9..9fda4b3428e9fd3b56b8601b4ebe747e6eb22ec1 100644 (file)
@@ -471,7 +471,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);