tracing
tracing copied to clipboard
Should crate documentation call out that non-blocking writers are lossy by default?
Feature Request
Crates
tracing-appender
Motivation
By default, non blocking appenders are lossy. Should the crate documentation call this out explicitly?
The crate docs are enough to get a working example, but it misses an important caveat. Silently, losing logs in a production environment is hard to diagnose, and should not be a default.
Further programs using asynchronous logging are probably fast enough where they might be silently running into this scenario.
Proposal
Add another Note beside the current note for WorkerGuard.
Note: non_blocking appenders are lossy by default and will drop events once internal buffers are filled. See non_blocking module for more details.
Alternatives
lossy may be disabled by default, but this might cause regression in environments where log loss actually occurs.
Yeah, I think it would be good to document this behavior more clearly. I'd happily merge a PR!
Thank you! I'd happy to contribute to the project too - I just raised a PR!