fn logfile_layer<S>(
config: &LogfileConfig,
granularity: Duration,
mistrust: &Mistrust,
path_resolver: &CfgPathResolver,
) -> Result<(impl Layer<S> + Send + Sync + Sized, WorkerGuard)>
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.