mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
example
This commit is contained in:
parent
6de42507e6
commit
03a09705ff
@ -73,9 +73,10 @@ int main(int, char* [])
|
||||
|
||||
//
|
||||
// Asynchronous logging is easy..
|
||||
// Just call spdlog::set_async_mode(max_q_size) and all created loggers from now on will be asynchronous..
|
||||
// Just call spdlog::set_async_mode(q_size) and all created loggers from now on will be asynchronous..
|
||||
// Note: queue size must be power of 2!
|
||||
//
|
||||
size_t max_q_size = 1048576;
|
||||
size_t max_q_size = 1048576;
|
||||
spdlog::set_async_mode(max_q_size);
|
||||
auto async_file= spd::daily_logger_st("async_file_logger", "logs/async_log.txt");
|
||||
async_file->info() << "This is async log.." << "Should be very fast!";
|
||||
|
Loading…
Reference in New Issue
Block a user