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

@@ -86,7 +86,8 @@ int main(int, char* [])
// syslog example
//
#ifdef __linux__
auto syslog_logger = spd::syslog_logger("syslog");
std::string ident = "my_ident";
auto syslog_logger = spd::syslog_logger("syslog", ident, spd::sinks::syslog::option::PID | spd::sinks::syslog::option::PERROR, "mail" );
syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!");
#endif
}