Merge pull request #20 from fooinha/syslog-openlog

Syslog openlog
This commit is contained in:
Gabi Melman
2014-12-18 20:42:51 +02:00
9 changed files with 75 additions and 18 deletions

View File

@@ -27,13 +27,42 @@
#include<initializer_list>
#include<chrono>
#ifdef __linux__
#define SYSLOG_NAMES 1
#include <syslog.h>
#endif
namespace spdlog
{
class formatter;
namespace sinks
{
class sink;
#ifdef __linux__
namespace syslog
{
namespace option
{
typedef enum
{
CONS = LOG_CONS,
NDELAY = LOG_NDELAY,
NOWAIT = LOG_NOWAIT,
ODELAY = LOG_ODELAY,
PERROR = LOG_PERROR,
PID = LOG_PID
} option_enum;
}
}
#endif
}
// Common types across the lib
using log_clock = std::chrono::system_clock;