[][src]Module spirit_log::background

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

AsyncLogger

A logger that postpones the logging into a background thread.

Background

A Transformation to move loggers into background threads.

FlushGuard

This, when dropped, flushes the logger.

Enums

OverflowMode

Selection of how to act if the channel to the logger thread is full.