I have been searching this site and the Boost.Log doc for a way to do this but have come up empty so far.
The doc (https://www.boost.org/doc/libs/1_74_0/libs/log/doc/html/log/detailed/sink_backends.html) mentions the ability to set a text_stream_backend
to flush after each log record written by calling auto_flush(true)
.
While this works well for debugging, I was wondering if it was possible to configure a custom number of log records received by the core
(or sink
?) before a flush()
occurs. My goal is to strike a balance between useful live logging (I can see the log records frequently enough with a tail -f
) and performance.
Alternatively, would it be possible to configure the size of the buffer containing log records so that once it fills up, it gets flushed?