example
This commit is contained in:
parent
5556967ed9
commit
87cc555d0b
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user