mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +01:00
update doc for default flush (#499)
This commit is contained in:
parent
7817fd3a94
commit
b24d4a4523
@ -116,7 +116,9 @@ Please see[API_custom_formatting.md](API_custom_formatting.md)
|
||||
|
||||
|
||||
## LOG <a name="log_flushing">flushing</a>
|
||||
The default file sink will flush each log entry as it comes in. For different flushing policies please take a look at g3sinks [logrotate and LogRotateWithFilters](https://github.com/KjellKod/g3sinks/tree/master/sink_logrotate).
|
||||
The default file sink will flush each log entry at set intervals. The default buffer size for flushing is set to 100 entries. You can adjust this down to 1, or as high as makes sense for your system. Please see [FileSink](https://github.com/KjellKod/g3log/blob/master/src/g3log/filesink.hpp#L18)
|
||||
|
||||
Even more flushing policies and log rotations can be found at g3sinks [logrotate and LogRotateWithFilters](https://github.com/KjellKod/g3sinks/tree/master/sink_logrotate).
|
||||
|
||||
At shutdown all enqueued logs will be flushed to the sink.
|
||||
At a discovered fatal event (SIGSEGV et.al) all enqueued logs will be flushed to the sink.
|
||||
@ -253,4 +255,4 @@ The default behaviour for G3log is to catch several fatal events before they for
|
||||
|
||||
An example of a Windows stackdump as shown in the output from the fatal example <i>g3log-FATAL-sigsegv</i>.
|
||||
|
||||
[introduction](index.md) | [detailed information](g3log.md) | [Configure & Build](building.md) | [**API description**](API.md) | [Custom log formatting](API_custom_formatting.md)
|
||||
[introduction](index.md) | [detailed information](g3log.md) | [Configure & Build](building.md) | [**API description**](API.md) | [Custom log formatting](API_custom_formatting.md)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <chrono>
|
||||
#include <exception>
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
|
||||
namespace {
|
||||
const std::string log_directory = "./";
|
||||
|
Loading…
Reference in New Issue
Block a user