pub struct LoggingConfig {
pub level: LevelFilter,
pub format: LogFormat,
}Expand description
Logging configuration.
Controls the verbosity and format of log output. Logs are always written to stderr.
Fields§
§level: LevelFilterMinimum log level to output.
Controls which log messages are emitted based on their severity. Messages at or above this level will be output. Valid levels in increasing severity: TRACE, DEBUG, INFO, WARN, ERROR, OFF.
The RUST_LOG environment variable provides more granular control per module if needed.
Important: Levels DEBUG and TRACE are very verbose and can impact performance; use
only for debugging.
§Default
INFO
§Environment Variable
OS__LOGGING__LEVEL
§Considerations
TRACEandDEBUGcan be very verbose and impact performance; use only for debuggingINFOis appropriate for productionWARNorERRORcan be used to reduce log volume in high-traffic systems
format: LogFormatLog output format.
Determines how log messages are formatted. See LogFormat for available options and
examples.
§Default
Auto (pretty for TTY, simplified otherwise)
§Environment Variable
OS__LOGGING__FORMAT
Trait Implementations§
Source§impl Debug for LoggingConfig
impl Debug for LoggingConfig
Source§impl Default for LoggingConfig
impl Default for LoggingConfig
Source§impl<'de> Deserialize<'de> for LoggingConfig
impl<'de> Deserialize<'de> for LoggingConfig
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 LoggingConfig
impl RefUnwindSafe for LoggingConfig
impl Send for LoggingConfig
impl Sync for LoggingConfig
impl Unpin for LoggingConfig
impl UnwindSafe for LoggingConfig
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