Update README.md

This commit is contained in:
Gabi Melman 2018-07-20 14:35:57 +03:00 committed by GitHub
parent 6225a9fa4f
commit 63db70aacc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,12 +167,7 @@ void async_example()
// spdlog::init_thread_pool(8192, 1); // queue with 8k items and 1 backing thread. // spdlog::init_thread_pool(8192, 1); // queue with 8k items and 1 backing thread.
auto async_file = spdlog::basic_logger_mt<spdlog::async_factory>("async_file_logger", "logs/async_log.txt"); auto async_file = spdlog::basic_logger_mt<spdlog::async_factory>("async_file_logger", "logs/async_log.txt");
// alternatively: // alternatively:
// auto async_file = spdlog::create_async<spdlog::sinks::basic_file_sink_mt>("async_file_logger", "logs/async_log.txt"); // auto async_file = spdlog::create_async<spdlog::sinks::basic_file_sink_mt>("async_file_logger", "logs/async_log.txt");
for (int i = 1; i < 101; ++i)
{
async_file->info("Async message #{}", i);
}
} }
``` ```