pub struct StdoutSink { /* private fields */ }Expand description
Stdout / writer-backed sink.
Implementations§
Source§impl StdoutSink
impl StdoutSink
Sourcepub fn new(style: FormatterStyle) -> Self
pub fn new(style: FormatterStyle) -> Self
Construct a stdout sink with the given style; writes to
std::io::stdout().
Sourcepub fn with_make_writer<M: MakeWriter>(style: FormatterStyle, mw: M) -> Self
pub fn with_make_writer<M: MakeWriter>(style: FormatterStyle, mw: M) -> Self
Construct with a caller-provided MakeWriter. Used to wire
LevelSplitWriter, RollingFileWriter, NonBlockingWriter,
or test harnesses.
Sourcepub fn severity_floor(self, sev: Severity) -> Self
pub fn severity_floor(self, sev: Severity) -> Self
Set a severity floor; envelopes below it are dropped.
Sourcepub fn with_writer<W: Write + Send + 'static>(
style: FormatterStyle,
writer: W,
) -> Self
pub fn with_writer<W: Write + Send + 'static>( style: FormatterStyle, writer: W, ) -> Self
Test helper: build a sink that writes into writer using
FormatterStyle::Full.
Trait Implementations§
Source§impl Debug for StdoutSink
impl Debug for StdoutSink
Source§impl Default for StdoutSink
impl Default for StdoutSink
Source§impl Sink for StdoutSink
impl Sink for StdoutSink
Source§fn deliver(&self, env: ScrubbedEnvelope<'_>)
fn deliver(&self, env: ScrubbedEnvelope<'_>)
Hand the envelope to the sink. Must not block; long IO is
queued internally. Spec 11 § 4 / spec 14 § 5.
Auto Trait Implementations§
impl !Freeze for StdoutSink
impl !RefUnwindSafe for StdoutSink
impl Send for StdoutSink
impl Sync for StdoutSink
impl Unpin for StdoutSink
impl UnsafeUnpin for StdoutSink
impl !UnwindSafe for StdoutSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more