fn logfile_layer<S>(
    config: &LogfileConfig,
    mistrust: &Mistrust
) -> Result<(impl Layer<S> + Send + Sync + Sized, WorkerGuard)> where
    S: Subscriber + for<'span> LookupSpan<'span> + Send + Sync
Expand description

Try to construct a non-blocking tracing Layer for writing data to an optionally rotating logfile.

On success, return that layer, along with a WorkerGuard that needs to be dropped when the program exits, to flush buffered messages.