pub struct LoggerConfig {
pub level: LogLevel,
pub name: String,
pub tracing: TracingConfig,
}Fields§
§level: LogLevel§name: String§tracing: TracingConfigImplementations§
Source§impl LoggerConfig
impl LoggerConfig
pub fn new() -> Self
pub fn from_name<T: ToString>(name: T) -> Self
pub fn from_level(level: LogLevel) -> Self
Sourcepub const fn level_mut(&mut self) -> &mut LogLevel
pub const fn level_mut(&mut self) -> &mut LogLevel
returns a mutable reference to the configured level
Sourcepub const fn name_mut(&mut self) -> &mut String
pub const fn name_mut(&mut self) -> &mut String
returns a mutable reference to the current logger name
Sourcepub const fn tracing(&self) -> TracingConfig
pub const fn tracing(&self) -> TracingConfig
returns a copy of the current tracing schema
Sourcepub const fn tracing_mut(&mut self) -> &mut TracingConfig
pub const fn tracing_mut(&mut self) -> &mut TracingConfig
returns a mutable reference to the current tracing configuration
Sourcepub fn set_level(&mut self, level: LogLevel) -> &mut Self
pub fn set_level(&mut self, level: LogLevel) -> &mut Self
update the current logger level and return a mutable reference
Sourcepub fn set_name<T: ToString>(&mut self, name: T) -> &mut Self
pub fn set_name<T: ToString>(&mut self, name: T) -> &mut Self
update the current logger name and return a mutable reference
Sourcepub fn set_tracing(&mut self, tracing: TracingConfig) -> &mut Self
pub fn set_tracing(&mut self, tracing: TracingConfig) -> &mut Self
update the current tracing schema and return a mutable reference
Sourcepub fn with_level(self, level: LogLevel) -> Self
pub fn with_level(self, level: LogLevel) -> Self
consumes the current instance to create another with the given logger level
Sourcepub fn with_name<T: ToString>(self, name: T) -> Self
pub fn with_name<T: ToString>(self, name: T) -> Self
consumes the current instance to create another with the given logger name
Sourcepub fn with_tracing(self, tracing: TracingConfig) -> Self
pub fn with_tracing(self, tracing: TracingConfig) -> Self
consumes the current instance to create another with the given tracing schema
pub fn init_tracing(&self)
Trait Implementations§
Source§impl Clone for LoggerConfig
impl Clone for LoggerConfig
Source§fn clone(&self) -> LoggerConfig
fn clone(&self) -> LoggerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoggerConfig
impl Debug for LoggerConfig
Source§impl Default for LoggerConfig
impl Default for LoggerConfig
Source§impl<'de> Deserialize<'de> for LoggerConfigwhere
LoggerConfig: Default,
impl<'de> Deserialize<'de> for LoggerConfigwhere
LoggerConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for LoggerConfig
impl Display for LoggerConfig
Source§impl Hash for LoggerConfig
impl Hash for LoggerConfig
Source§impl Ord for LoggerConfig
impl Ord for LoggerConfig
Source§fn cmp(&self, other: &LoggerConfig) -> Ordering
fn cmp(&self, other: &LoggerConfig) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LoggerConfig
impl PartialEq for LoggerConfig
Source§impl PartialOrd for LoggerConfig
impl PartialOrd for LoggerConfig
Source§impl Serialize for LoggerConfig
impl Serialize for LoggerConfig
impl Eq for LoggerConfig
impl Send for LoggerConfig
impl StructuralPartialEq for LoggerConfig
impl Sync for LoggerConfig
Auto Trait Implementations§
impl Freeze for LoggerConfig
impl RefUnwindSafe for LoggerConfig
impl Unpin for LoggerConfig
impl UnwindSafe for LoggerConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.