Added periodic flusher support, and fixed some registry issues

This commit is contained in:
gabime
2018-07-21 23:30:26 +03:00
parent d5af87a8e1
commit a96b4d7529
10 changed files with 135 additions and 59 deletions

View File

@@ -145,6 +145,7 @@ void rotating_example()
auto rotating_logger = spdlog::rotating_logger_mt("some_logger_name", "logs/rotating.txt", 1048576 * 5, 3);
}
```
---
#### Daily files
```c++
@@ -157,6 +158,16 @@ void daily_example()
}
```
---
#### Periodic flush
```c++
// periodically flush all *registered* loggers every 3 seconds:
// warning: only use if all your loggers are thread safe!
spdlog::flush_every(std::chrono::seconds(3));
```
---
#### Asynchronous logging
```c++