updated example

This commit is contained in:
gabime 2014-12-21 02:34:52 +02:00
parent 174c77bc74
commit e0b99edc99
2 changed files with 4 additions and 4 deletions

View File

@ -109,8 +109,8 @@ int main(int, char* [])
auto async_file= spd::daily_logger_st("async_file_logger", "logs/async_log.txt"); auto async_file= spd::daily_logger_st("async_file_logger", "logs/async_log.txt");
async_file->info() << "This is async log.." << "Should be very fast!"; async_file->info() << "This is async log.." << "Should be very fast!";
// syslog example. linux only..
#ifdef __linux__ #ifdef __linux__
// syslog example
std::string ident = "spdlog-example"; std::string ident = "spdlog-example";
auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID); auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID);
syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!"); syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!");

View File

@ -76,7 +76,7 @@ int main(int, char* [])
async_file->info() << "This is async log.." << "Should be very fast!"; async_file->info() << "This is async log.." << "Should be very fast!";
#ifdef __linux__ #ifdef __linux__
// syslog example // syslog example. linux only..
std::string ident = "spdlog-example"; std::string ident = "spdlog-example";
auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID); auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID);
syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!"); syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!");