pub struct Options {
pub time_function: TimeFunction,
pub time_format: String,
pub level: Level,
pub prefix: String,
pub report_timestamp: bool,
pub report_caller: bool,
pub caller_formatter: CallerFormatter,
pub caller_offset: usize,
pub fields: Vec<(String, String)>,
pub formatter: Formatter,
}Expand description
Logger options.
Fields§
§time_function: TimeFunctionTime function for the logger.
time_format: StringTime format string.
level: LevelMinimum log level.
prefix: StringLog prefix.
report_timestamp: boolWhether to report timestamps.
report_caller: boolWhether to report caller location.
§Performance Warning
When enabled, captures a full stack backtrace on every log call, which is approximately 100-1000x slower than normal logging. Only enable during active debugging sessions. Do NOT enable in production.
caller_formatter: CallerFormatterCaller formatter function.
caller_offset: usizeCaller offset for stack trace.
fields: Vec<(String, String)>Default fields to include in all logs.
formatter: FormatterOutput formatter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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