From 87cc555d0b2c667b99aef0c9d0e6650362c9c98a Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 29 Mar 2014 01:37:29 +0300 Subject: [PATCH] example --- example/example.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/example/example.cpp b/example/example.cpp index 2c5c7928..18bbc168 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -20,6 +20,9 @@ int main(int argc, char* argv[]) const unsigned int howmany = argc <= 1 ? 1000:atoi(argv[1]); + logger cout_logger ("", sinks::stdout_sink()); + cout_logger.info("Hello ") << "man"; + auto fsink = std::make_shared("log", "txt", 1024*1024*50 , 5, 0); logger my_logger ("my_logger", sinks::null_sink::get()); @@ -31,7 +34,7 @@ int main(int argc, char* argv[]) auto delta = system_clock::now() - start; auto delta_d = duration_cast> (delta).count(); - logger cout_logger ("", sinks::stdout_sink()); + cout_logger.info("Total:") << format(howmany); cout_logger.info("Delta:") << format(delta_d); cout_logger.info("Rate:") << format(howmany/delta_d) << "/sec";