mirror of
https://github.com/gabime/spdlog.git
synced 2025-03-29 17:32:41 +08:00
updated example
This commit is contained in:
parent
0c254a6902
commit
679ad512ea
@ -33,7 +33,7 @@ int main(int, char* [])
|
||||
namespace spd = spdlog;
|
||||
try
|
||||
{
|
||||
// Set log level to all loggers to DEBUG and above
|
||||
// Set log level to all loggers to debug and above
|
||||
spd::set_level(spd::level::debug);
|
||||
|
||||
// Create console, multithreaded logger
|
||||
@ -75,8 +75,8 @@ int main(int, char* [])
|
||||
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!";
|
||||
|
||||
#ifdef __linux__
|
||||
// syslog example. linux only..
|
||||
#ifdef __linux__
|
||||
std::string ident = "spdlog-example";
|
||||
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!");
|
||||
|
Loading…
Reference in New Issue
Block a user