Optional arguments for syslog_logger factory.

This commit is contained in:
fooinha
2014-12-18 15:47:43 +00:00
parent 309fca8a72
commit 375b88c191
4 changed files with 32 additions and 20 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;