Module spirit_log::background [−][src]
Expand description
Support for logging in the background.
The AsyncLogger
can wrap a logger and do the logging in a separate thread. Note that to not
lose logs on shutdown, the logger needs to be flushed, either manually or using the
FlushGuard
.
To integrate with the Pipeline
, the Background
can be used as a Transformation
of
loggers.
Structs
A logger that postpones the logging into a background thread.
A Transformation
to move loggers into background threads.
This, when dropped, flushes the logger.
Enums
Selection of how to act if the channel to the logger thread is full.