pub struct LogConfig {
pub level: LogLevel,
pub file_name: String,
pub time_format: String,
pub with_ansi: bool,
pub with_target: bool,
pub with_thread_names: bool,
pub with_thread_ids: bool,
pub with_line_number: bool,
pub with_file: bool,
pub with_level: bool,
}Expand description
Structure holding the logging configuration.
Every field is deserializable from a TOML file and has a sensible default
so missing keys do not break loading (#[serde(default)]).
Mirrors the boolean / time format options exposed by tracing_subscriber::fmt::Layer.
Fields§
§level: LogLevelLogging level (off, error, warn, info, debug, trace)
file_name: StringName of the log file (written in current directory)
time_format: StringTime format string (uses the time crate format_description syntax)
with_ansi: boolDisable ANSI colors in the log file
with_target: boolInclude the module path (target) in each log line
with_thread_names: boolInclude thread names in each log line
with_thread_ids: boolInclude thread ids in each log line
with_line_number: boolInclude line numbers in each log line
with_file: boolInclude source file name in each log line
with_level: boolInclude the log level in each log line
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogConfig
impl<'de> Deserialize<'de> for LogConfig
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
Auto Trait Implementations§
impl Freeze for LogConfig
impl RefUnwindSafe for LogConfig
impl Send for LogConfig
impl Sync for LogConfig
impl Unpin for LogConfig
impl UnsafeUnpin for LogConfig
impl UnwindSafe for LogConfig
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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