diff --git a/main/logger.c b/main/logger.c
index 9a16dcf13bcc7c9c93134c7175cbab54d3c4249f..db3d7a730a1953495c72b9758d557f463d409431 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -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);