Add a syslog() based sink for Linux.

This commit introduce a new sink: syslog_sink.
This sink is Linux only, and will write log entries to the system
logger, using the syslog() library call.

It is instanciable using spdlog::syslog_logger(name). Note that
the suffix _st or _mt is not present, as syslog() is thread-safe.

I also applied @gabime reviews and added license header.
This commit is contained in:
Arnaud Kapp
2014-11-11 00:12:47 +01:00
parent 3569a76b4c
commit 67eef26c26
6 changed files with 121 additions and 12 deletions

View File

@@ -46,17 +46,17 @@ namespace level
{
typedef enum
{
TRACE,
DEBUG,
INFO,
NOTICE,
WARN,
ERR,
CRITICAL,
ALERT,
EMERG,
ALWAYS,
OFF
TRACE = 0,
DEBUG = 1,
INFO = 2,
NOTICE = 3,
WARN = 4,
ERR = 5,
CRITICAL = 6,
ALERT = 7,
EMERG = 8,
ALWAYS = 9,
OFF = 10
} level_enum;
static const char* level_names[] { "trace", "debug", "info", "notice", "warning", "error", "critical",