From efc8de6d6440667271ecf515875536eb74981ae7 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Sat, 20 Aug 2016 14:01:40 +0300 Subject: [PATCH] Update README.md --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index db28a3bf..cbb19f92 100644 --- a/README.md +++ b/README.md @@ -132,14 +132,15 @@ int main(int, char*[]) // syslog example. linux/osx only.. syslog_example(); - // log user-defined types example.. + // Log user-defined types example.. user_defined_example(); - // Change default log error handler - err_handler_example(); - - console->info("End of example. bye.."); + // Change default log error handler + err_handler_example(); + // Apply a function on all registered loggers + spd::apply_all([&](std::shared_ptr l) {l->info("End of example."); }); + // Release and close all loggers spdlog::drop_all(); } @@ -157,7 +158,7 @@ void async_example() spdlog::set_async_mode(q_size); auto async_file = spd::daily_logger_st("async_file_logger", "logs/async_log.txt"); for (int i = 0; i < 100; ++i) - async_file->info("Async message #{}{}", i); + async_file->info("Async message #{}", i); } //syslog example (linux/osx only)