pub struct LoggerConfig {
pub level: LogLevel,
pub handlers: Vec<HandlerRef>,
pub capture_source: bool,
pub use_colors: bool,
pub format: String,
}
Expand description
Configuration for the logger.
Fields§
§level: LogLevel
The minimum log level to record.
handlers: Vec<HandlerRef>
The handlers to use for logging.
capture_source: bool
Whether to capture source location information.
use_colors: bool
Whether to use colors in console output.
format: String
The format string for log messages.
Implementations§
Source§impl LoggerConfig
Helper functions for creating common configurations.
impl LoggerConfig
Helper functions for creating common configurations.
Sourcepub fn basic_console() -> LoggerConfig
pub fn basic_console() -> LoggerConfig
Create a basic console configuration.
Sourcepub fn file_logging(_path: PathBuf) -> LoggerConfig
pub fn file_logging(_path: PathBuf) -> LoggerConfig
Create a file logging configuration.
Sourcepub fn development() -> LoggerConfig
pub fn development() -> LoggerConfig
Create a development configuration with detailed logging.
Sourcepub fn production() -> LoggerConfig
pub fn production() -> LoggerConfig
Create a production configuration with minimal logging.
Trait Implementations§
Source§impl Clone for LoggerConfig
impl Clone for LoggerConfig
Source§impl Debug for LoggerConfig
impl Debug for LoggerConfig
Auto Trait Implementations§
impl Freeze for LoggerConfig
impl !RefUnwindSafe for LoggerConfig
impl Send for LoggerConfig
impl Sync 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