From 297cbc1ffc55b7abc28c0a653671ec8f3c73c301 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Wed, 28 Jan 2015 13:23:15 +0200 Subject: [PATCH] Updated example --- example/example.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/example/example.cpp b/example/example.cpp index 312ee57f..5f576bcb 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -37,9 +37,8 @@ int main(int, char* []) spd::set_level(spd::level::debug); // Create console, multithreaded logger - auto console = spd::stdout_logger_mt("console"); - const std::string s("Hello {}", 1); - console->info(s) ; + auto console = spd::stdout_logger_mt("console"); + console->info("Hello {}", 1); console->info("An info message example {}..", 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!"); #endif + //Close all loggers + spd::drop_all(); } catch (const spd::spdlog_ex& ex) {