Struct tracing_forest::processor::blocking::BlockingProcessor
source · [−]pub struct BlockingProcessor<F, W> { /* private fields */ }
Expand description
A Processor
that blocks the current thread to format and write logs on
arrival.
This type is usually created and used by the LayerBuilder
type.
Implementations
impl<F, W> BlockingProcessor<F, W> where
F: 'static + Formatter,
W: 'static + for<'a> MakeWriter<'a>,
impl<F, W> BlockingProcessor<F, W> where
F: 'static + Formatter,
W: 'static + for<'a> MakeWriter<'a>,
Create a new BlockingProcessor
.
Examples
fn main() {
let _guard = tracing::subscriber::set_default({
BlockingProcessor::new(Pretty::new(), std::io::stdout)
.into_layer()
.into_subscriber()
});
tracing::info!("blocking the thread to process this log >:)");
}
Trait Implementations
impl<F, W> Processor for BlockingProcessor<F, W> where
F: 'static + Formatter,
W: 'static + for<'a> MakeWriter<'a>,
impl<F, W> Processor for BlockingProcessor<F, W> where
F: 'static + Formatter,
W: 'static + for<'a> MakeWriter<'a>,
Auto Trait Implementations
impl<F, W> RefUnwindSafe for BlockingProcessor<F, W> where
F: RefUnwindSafe,
W: RefUnwindSafe,
impl<F, W> Send for BlockingProcessor<F, W> where
F: Send,
W: Send,
impl<F, W> Sync for BlockingProcessor<F, W> where
F: Sync,
W: Sync,
impl<F, W> Unpin for BlockingProcessor<F, W> where
F: Unpin,
W: Unpin,
impl<F, W> UnwindSafe for BlockingProcessor<F, W> where
F: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more