You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Target::Pipe to log to a file (or another similar buffered output interface), the fact that we flush after each line causes a significant slowdown. It would be awesome to provide some sort of configuration mechanism to disable this automatic flushing after each line, letting the user force flushing at shutdown with log::logger().flush(), if necessary.
It looks like this automatic flushing logic was added here.
The text was updated successfully, but these errors were encountered:
Automatic flushing is the right default due to concerns over crashing, reading pipes while writing continues, etc.
Allowing this to be configurable on the pipe definition would be a breaking change because we just accept a Box from the user and we'd need to change that type.
We could maybe make flushing a logger-wide setting though I'm mixed on that.
When using
Target::Pipe
to log to a file (or another similar buffered output interface), the fact that we flush after each line causes a significant slowdown. It would be awesome to provide some sort of configuration mechanism to disable this automatic flushing after each line, letting the user force flushing at shutdown withlog::logger().flush()
, if necessary.It looks like this automatic flushing logic was added here.
The text was updated successfully, but these errors were encountered: