Skip to content

Commit

Permalink
update doc for default flush (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
KjellKod authored Aug 17, 2023
1 parent 7817fd3 commit b24d4a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
1 change: 1 addition & 0 deletions test_unit/test_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <chrono>
#include <exception>
#include <algorithm>
#include <iomanip>

namespace {
const std::string log_directory = "./";
Expand Down

0 comments on commit b24d4a4

Please sign in to comment.