pub struct LoggerConfig {
pub policy: LogPolicy,
pub output: LogOutputMode,
pub file: Option<FileSinkConfig>,
pub crash_events: usize,
pub crash_bytes: usize,
}Expand description
Complete explicit logger configuration.
Fields§
§policy: LogPolicyFiltering and sanitization policy.
output: LogOutputModeTerminal, file, both, disabled or crash-only behavior.
file: Option<FileSinkConfig>File configuration used by file output or an explicit crash dump.
crash_events: usizeMaximum events retained by crash-only mode.
crash_bytes: usizeMaximum estimated bytes retained by crash-only mode.
Implementations§
Source§impl LoggerConfig
impl LoggerConfig
Sourcepub fn build(self) -> Result<ConfiguredLogger, LogConfigError>
pub fn build(self) -> Result<ConfiguredLogger, LogConfigError>
Builds a logger with no hidden global state or background thread.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
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§fn default() -> LoggerConfig
fn default() -> LoggerConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LoggerConfig
impl RefUnwindSafe for LoggerConfig
impl Send for LoggerConfig
impl Sync for LoggerConfig
impl Unpin for LoggerConfig
impl UnsafeUnpin 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