pub struct FileLoggerBuilder {
pub enabled: bool,
pub path: Option<String>,
pub log_format: Option<FileLoggerFormat>,
}
Expand description
Builder for configuring a file logger.
Fields§
§enabled: bool
Enables or disables file logging.
path: Option<String>
Path to the log file.
log_format: Option<FileLoggerFormat>
Format of the log file.
Implementations§
Source§impl FileLoggerBuilder
impl FileLoggerBuilder
Sourcepub fn new() -> FileLoggerBuilder
pub fn new() -> FileLoggerBuilder
Creates a new FileLoggerBuilder
with default settings.
Sourcepub fn path(self, path: String) -> FileLoggerBuilder
pub fn path(self, path: String) -> FileLoggerBuilder
Sets the path for the log file.
Sourcepub fn log_format(self, log_format: FileLoggerFormat) -> FileLoggerBuilder
pub fn log_format(self, log_format: FileLoggerFormat) -> FileLoggerBuilder
Sets the format for the log file.
Sourcepub fn build(self) -> Result<FileLogger, String>
pub fn build(self) -> Result<FileLogger, String>
Builds the FileLogger
instance.
Auto Trait Implementations§
impl Freeze for FileLoggerBuilder
impl RefUnwindSafe for FileLoggerBuilder
impl Send for FileLoggerBuilder
impl Sync for FileLoggerBuilder
impl Unpin for FileLoggerBuilder
impl UnwindSafe for FileLoggerBuilder
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