Add NOTICE, ALERT and EMERG log level.

This commit introduces 3 new log level. Thoses are:
    + NOTICE, which is a bit worse that INFO, but still not a warn.
    + ALERT, for case worse that critical.
    + EMERG, application is unusable.

With those 3 log levels, spdlog now has all log level accepted by
the syslog() system call.
This commit is contained in:
xaqq
2014-11-10 18:39:55 +01:00
parent 3bc1f447a1
commit e4adba854c
3 changed files with 26 additions and 1 deletions

View File

@@ -49,14 +49,18 @@ typedef enum
TRACE,
DEBUG,
INFO,
NOTICE,
WARN,
ERR,
CRITICAL,
ALERT,
EMERG,
ALWAYS,
OFF
} level_enum;
static const char* level_names[] { "trace", "debug", "info", "warning", "error", "critical", "", ""};
static const char* level_names[] { "trace", "debug", "info", "notice", "warning", "error", "critical",
"alert", "emerg", "", ""};
inline const char* to_str(spdlog::level::level_enum l)
{
return level_names[l];