diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h
index 8fdc97e65dc7c16b4c9fb544d2966689bc6d17b2..c7f260c491b4cf114448db5df51d0ed442c58248 100644
--- a/include/asterisk/logger.h
+++ b/include/asterisk/logger.h
@@ -182,7 +182,7 @@ void ast_console_toggle_loglevel(int fd, int level, int state);
 #endif
 #define AST_LOG_DTMF    __LOG_DTMF, _A_
 
-#define NUMLOGLEVELS 7
+#define NUMLOGLEVELS 32
 
 /*!
  * \brief Get the debug level for a module
diff --git a/main/logger.c b/main/logger.c
index 74b7dd1901b6ae9727515d5f87a3125ba4a7e49e..1c13773df48678c2cfa199207c92646175b50f11 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -157,7 +157,7 @@ static FILE *qlog;
  * logchannels list.
  */
 
-static char *levels[32] = {
+static char *levels[NUMLOGLEVELS] = {
 	"DEBUG",
 	"---EVENT---",		/* no longer used */
 	"NOTICE",
@@ -168,7 +168,7 @@ static char *levels[32] = {
 };
 
 /*! \brief Colors used in the console for logging */
-static const int colors[32] = {
+static const int colors[NUMLOGLEVELS] = {
 	COLOR_BRGREEN,
 	COLOR_BRBLUE,		/* no longer used */
 	COLOR_YELLOW,