Commit 87cc555d authored by gabime's avatar gabime

example

parent 5556967e
......@@ -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<sinks::rotating_file_sink>("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<duration<double>> (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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment