This commit is contained in:
gabime
2016-08-20 13:55:50 +03:00
parent efc8de6d64
commit 4efbd950d6
5 changed files with 36 additions and 29 deletions

View File

@@ -78,11 +78,14 @@ int main(int, char*[])
// Change default log error handler
err_handler_example();
// Apply a function on all registered loggers
spd::apply_all([&](std::shared_ptr<spdlog::logger> l) {l->info("End of example."); });
// Release and close all loggers
// Apply a function on all registered loggers
spd::apply_all([&](std::shared_ptr<spdlog::logger> l)
{
l->info("End of example.");
});
// Release and close all loggers
spdlog::drop_all();
}
// Exceptions will only be thrown upon failed logger or sink construction (not during logging)