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 Freeze for NonBlockingBuilder
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