pub struct TracingConfig { /* private fields */ }Expand description
The tracing configuration properties.
Implementations§
Source§impl TracingConfig
impl TracingConfig
Sourcepub fn filter_level(self, filter_level: &str) -> Self
pub fn filter_level(self, filter_level: &str) -> Self
Will try_from_default_env while not setted.
You can use value like “info”, or something like “mycrate=trace”.
Default value if “info”.
Sourcepub fn rolling(self, rolling: &str) -> Self
pub fn rolling(self, rolling: &str) -> Self
Valid values: minutely | hourly | daily | never
Will panic on other values.
Sourcepub fn format(self, format: &str) -> Self
pub fn format(self, format: &str) -> Self
Valid values: pretty | compact | json | full
Will panic on other values.
Sourcepub fn with_level(self, with_level: bool) -> Self
pub fn with_level(self, with_level: bool) -> Self
include levels in formatted output
Sourcepub fn with_target(self, with_target: bool) -> Self
pub fn with_target(self, with_target: bool) -> Self
include targets
Sourcepub fn with_thread_ids(self, with_thread_ids: bool) -> Self
pub fn with_thread_ids(self, with_thread_ids: bool) -> Self
include the thread ID of the current thread
Sourcepub fn with_thread_names(self, with_thread_names: bool) -> Self
pub fn with_thread_names(self, with_thread_names: bool) -> Self
include the name of the current thread
Sourcepub fn with_source_location(self, with_source_location: bool) -> Self
pub fn with_source_location(self, with_source_location: bool) -> Self
include source location
Sourcepub fn init(self) -> WorkerGuard
pub fn init(self) -> WorkerGuard
Init tracing log.
Caller should hold the guard.
Trait Implementations§
Source§impl Clone for TracingConfig
impl Clone for TracingConfig
Source§fn clone(&self) -> TracingConfig
fn clone(&self) -> TracingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TracingConfig
impl Debug for TracingConfig
Auto Trait Implementations§
impl Freeze for TracingConfig
impl RefUnwindSafe for TracingConfig
impl Send for TracingConfig
impl Sync for TracingConfig
impl Unpin for TracingConfig
impl UnwindSafe for TracingConfig
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