Skip to main content

LogWriter

Trait LogWriter 

Source
pub trait LogWriter<S>: Layer<S>
where S: Subscriber + for<'a> LookupSpan<'a>,
{ // Required method fn flush(&self) -> impl Future<Output = ()> + Send + '_; }
Expand description

A tracing log writer that can flush entries accepted by its queue.

Implementations should keep Layer::on_event non-blocking for ordinary log events. flush should wait for entries accepted before the flush command to be processed by the writer.

Required Methods§

Source

fn flush(&self) -> impl Future<Output = ()> + Send + '_

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S> LogWriter<S> for LogDbLayer
where S: Subscriber + for<'a> LookupSpan<'a>,