Struct sc_tracing::logging::LoggerBuilder
source · [−]pub struct LoggerBuilder { /* private fields */ }
Expand description
A builder that is used to initialize the global logger.
Implementations
sourceimpl 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 RefUnwindSafe for LoggerBuilder
impl Send for LoggerBuilder
impl Sync for LoggerBuilder
impl Unpin for LoggerBuilder
impl UnwindSafe for LoggerBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more