Struct tracing_appender::non_blocking::NonBlockingBuilder
source · pub struct NonBlockingBuilder { /* private fields */ }
Expand description
A builder for NonBlocking
.
Implementations§
source§impl NonBlockingBuilder
impl NonBlockingBuilder
sourcepub fn buffered_lines_limit(
self,
buffered_lines_limit: usize
) -> NonBlockingBuilder
pub fn buffered_lines_limit( self, buffered_lines_limit: usize ) -> NonBlockingBuilder
Sets the number of lines to buffer before dropping logs or exerting backpressure on senders
sourcepub fn lossy(self, is_lossy: bool) -> NonBlockingBuilder
pub fn lossy(self, is_lossy: bool) -> NonBlockingBuilder
Sets whether NonBlocking
should be lossy or not.
If set to true
, logs will be dropped when the buffered limit is reached. If false
, backpressure
will be exerted on senders, blocking them until the buffer has capacity again.
By default, the built NonBlocking
will be lossy.
sourcepub fn thread_name(self, name: &str) -> NonBlockingBuilder
pub fn thread_name(self, name: &str) -> NonBlockingBuilder
Override the worker thread’s name.
The default worker thread name is “tracing-appender”.
sourcepub fn finish<T: Write + Send + 'static>(
self,
writer: T
) -> (NonBlocking, WorkerGuard)
pub fn finish<T: Write + Send + 'static>( self, writer: T ) -> (NonBlocking, WorkerGuard)
Completes the builder, returning the configured NonBlocking
.
Trait Implementations§
source§impl Debug for NonBlockingBuilder
impl Debug for NonBlockingBuilder
Auto Trait Implementations§
impl RefUnwindSafe for NonBlockingBuilder
impl Send for NonBlockingBuilder
impl Sync for NonBlockingBuilder
impl Unpin for NonBlockingBuilder
impl UnwindSafe for NonBlockingBuilder
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