Struct emit::pipeline::builder::PipelineBuilder
[−]
[src]
pub struct PipelineBuilder { /* fields omitted */ }
PipelineBuilder
creates an event emitting pipeline. Calling init()
will install the pipeline globally
for use by the emit!()
family of macros. Calling detach()
will return an independent pipeline that
can be used in isolation.
Methods
impl PipelineBuilder
[src]
fn new() -> PipelineBuilder
fn at_level(self, level: LogLevelFilter) -> Self
Set the logging level used by the pipeline. The default is LogLevelFilter::Info
.
fn pipe(self, element: Box<Propagate + Sync>) -> Self
Add a processing element to the pipeline. Elements run in the order in which they
are added, so the output of one pipe()
d element is fed into the next.
fn write_to<T: AcceptEvents + Sync + 'static>(self, collector: T) -> Self
Write to a collector, synchronously.
fn send_to<T: AcceptEvents + Send + 'static>(self, collector: T) -> Self
Send events to a collector, asynchronously. At present only one collector may receive events this way.
fn detach(self) -> (PipelineRef, AsyncFlushHandle)
Build the pipeline, but don't globally install it.
fn init(self) -> AsyncFlushHandle
Build and globally install the pipeline so that the emit!()
macros can call it.