pub struct LoggerBuilder { /* private fields */ }
Expand description
A builder that is used to initialize the global logger.
Implementations§
Source§impl LoggerBuilder
impl LoggerBuilder
Sourcepub fn new<S: Into<String>>(directives: S) -> Self
pub fn new<S: Into<String>>(directives: S) -> Self
Create a new LoggerBuilder
which can be used to initialize the global logger.
Sourcepub fn with_profiling<S: Into<String>>(
&mut self,
tracing_receiver: TracingReceiver,
profiling_targets: S,
) -> &mut Self
pub fn with_profiling<S: Into<String>>( &mut self, tracing_receiver: TracingReceiver, profiling_targets: S, ) -> &mut Self
Set up the profiling.
Sourcepub fn with_log_reloading(&mut self, enabled: bool) -> &mut Self
pub fn with_log_reloading(&mut self, enabled: bool) -> &mut Self
Wether or not to disable log reloading.
Sourcepub fn with_telemetry_buffer_size(&mut self, buffer_size: usize) -> &mut Self
pub fn with_telemetry_buffer_size(&mut self, buffer_size: usize) -> &mut Self
Set a custom buffer size for the telemetry.
Sourcepub fn with_transport(&mut self, transport: ExtTransport) -> &mut Self
pub fn with_transport(&mut self, transport: ExtTransport) -> &mut Self
Set a custom network transport (used for the telemetry).
Sourcepub fn with_colors(&mut self, enable: bool) -> &mut Self
pub fn with_colors(&mut self, enable: bool) -> &mut Self
Force enable/disable colors.
Sourcepub fn init(self) -> Result<TelemetryWorker>
pub fn init(self) -> Result<TelemetryWorker>
Initialize the global logger
This sets various global logging and tracing instances and thus may only be called once.
Auto Trait Implementations§
impl Freeze for LoggerBuilder
impl RefUnwindSafe for LoggerBuilder
impl Send for LoggerBuilder
impl Sync for LoggerBuilder
impl Unpin for LoggerBuilder
impl UnwindSafe for LoggerBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more