mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
Updated example
This commit is contained in:
parent
94deae042c
commit
297cbc1ffc
@ -38,8 +38,7 @@ int main(int, char* [])
|
|||||||
|
|
||||||
// Create console, multithreaded logger
|
// Create console, multithreaded logger
|
||||||
auto console = spd::stdout_logger_mt("console");
|
auto console = spd::stdout_logger_mt("console");
|
||||||
const std::string s("Hello {}", 1);
|
console->info("Hello {}", 1);
|
||||||
console->info(s) ;
|
|
||||||
console->info("An info message example {}..", 1);
|
console->info("An info message example {}..", 1);
|
||||||
console->info() << "Streams are supported too " << 1;
|
console->info() << "Streams are supported too " << 1;
|
||||||
|
|
||||||
@ -81,6 +80,8 @@ int main(int, char* [])
|
|||||||
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!");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//Close all loggers
|
||||||
|
spd::drop_all();
|
||||||
}
|
}
|
||||||
catch (const spd::spdlog_ex& ex)
|
catch (const spd::spdlog_ex& ex)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user