#[non_exhaustive]pub struct LoggingOptions { /* private fields */ }Expand description
Immutable per-check logging configuration.
Logging is enabled only when this value is supplied through
crate::CheckOptions::with_logging. Clones share only their file-initialization lock so the
same explicit configuration remains safe to use from concurrent checks; no global logger or
ambient configuration is read.
Implementations§
Source§impl LoggingOptions
impl LoggingOptions
Sourcepub const fn with_level(self, level: LogLevel) -> Self
pub const fn with_level(self, level: LogLevel) -> Self
Sets the minimum emitted severity.
Sourcepub const fn with_console_output(self, enabled: bool) -> Self
pub const fn with_console_output(self, enabled: bool) -> Self
Enables or disables console output for this configuration.
Sourcepub fn with_file_output(self, directory: impl AsRef<Path>) -> Self
pub fn with_file_output(self, directory: impl AsRef<Path>) -> Self
Enables file output under directory with an automatically timestamped .log filename.
Sourcepub fn with_file_mode(self, mode: LogFileMode) -> Self
pub fn with_file_mode(self, mode: LogFileMode) -> Self
Selects append or one-time overwrite initialization for file output.
Sourcepub const fn logs_to_console(&self) -> bool
pub const fn logs_to_console(&self) -> bool
Returns whether records are written to the console.
Sourcepub fn file_path(&self) -> Option<&Path>
pub fn file_path(&self) -> Option<&Path>
Returns the timestamped log path, or None when file output is disabled.
Sourcepub const fn file_mode(&self) -> LogFileMode
pub const fn file_mode(&self) -> LogFileMode
Returns the file initialization policy.
Trait Implementations§
Source§impl Clone for LoggingOptions
impl Clone for LoggingOptions
Source§fn clone(&self) -> LoggingOptions
fn clone(&self) -> LoggingOptions
Returns a copy of the value. Read more
1.0.0 · 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 LoggingOptions
impl Debug for LoggingOptions
Source§impl Default for LoggingOptions
impl Default for LoggingOptions
Source§impl PartialEq for LoggingOptions
impl PartialEq for LoggingOptions
impl Eq for LoggingOptions
Auto Trait Implementations§
impl Freeze for LoggingOptions
impl RefUnwindSafe for LoggingOptions
impl Send for LoggingOptions
impl Sync for LoggingOptions
impl Unpin for LoggingOptions
impl UnwindSafe for LoggingOptions
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.