pub struct FileHandler { /* private fields */ }
Expand description
A handler that writes log records to a file.
Implementations§
Source§impl FileHandler
impl FileHandler
Sourcepub fn with_colors(self, use_colors: bool) -> Self
pub fn with_colors(self, use_colors: bool) -> Self
Sets whether to use colors in the output.
Sourcepub fn with_pattern(self, pattern: impl Into<String>) -> Self
pub fn with_pattern(self, pattern: impl Into<String>) -> Self
Sets the format pattern to use.
Sourcepub fn with_rotation(self, max_size: u64) -> Self
pub fn with_rotation(self, max_size: u64) -> Self
Sets the maximum file size before rotation
Sourcepub fn with_retention(self, retention: usize) -> Self
pub fn with_retention(self, retention: usize) -> Self
Sets the number of old files to keep
Trait Implementations§
Source§impl Debug for FileHandler
impl Debug for FileHandler
Source§impl Handler for FileHandler
impl Handler for FileHandler
Source§fn set_enabled(&mut self, enabled: bool)
fn set_enabled(&mut self, enabled: bool)
Enable or disable the handler
Source§fn set_formatter(&mut self, formatter: Formatter)
fn set_formatter(&mut self, formatter: Formatter)
Set the formatter
Auto Trait Implementations§
impl Freeze for FileHandler
impl !RefUnwindSafe for FileHandler
impl Send for FileHandler
impl Sync for FileHandler
impl Unpin for FileHandler
impl !UnwindSafe for FileHandler
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