Commit 5db6c516 authored by gabime's avatar gabime

exmaple

parent 841eb391
...@@ -59,8 +59,10 @@ int main(int, char* []) ...@@ -59,8 +59,10 @@ int main(int, char* [])
//Create a file rotating logger with 5mb size max and 3 rotated files //Create a file rotating logger with 5mb size max and 3 rotated files
auto file_logger = spd::rotating_logger_mt("file_logger", filename, 1024 * 1024 * 5, 3); auto file_logger = spd::rotating_logger_mt("file_logger", filename, 1024 * 1024 * 5, 3);
file_logger->info("Log file message number", 1);
file_logger->info("Log file message number", 1);
for(int i = 0; i < 10; ++i)
file_logger->info("{} * {} equals {:>10}", i, i, i*i);
spd::set_pattern("*** [%H:%M:%S %z] [thread %t] %v ***"); spd::set_pattern("*** [%H:%M:%S %z] [thread %t] %v ***");
file_logger->info("This is another message with custom format"); file_logger->info("This is another message with custom format");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment