pub struct FileAppenderBuilder { /* private fields */ }Expand description
Builder for FileAppender
Use this builder to configure and create FileAppender instances.
§Examples
use wattle_appender::FileAppender;
let appender = FileAppender::new()
.file_name("logs/app.log")
.daily_rotation()
.size_limit(10 * 1024 * 1024)
.max_backup(20)
.build()
.unwrap();Implementations§
Source§impl FileAppenderBuilder
impl FileAppenderBuilder
Sourcepub fn blocking(self, is_blocking: bool) -> Self
pub fn blocking(self, is_blocking: bool) -> Self
Set whether to use blocking mode
Requires non-blocking feature to use non-blocking mode
pub fn file_name(self, file_name: impl AsRef<Path>) -> Self
pub fn minutely_rotation(self) -> Self
pub fn hourly_rotation(self) -> Self
pub fn daily_rotation(self) -> Self
pub fn weekly_rotation(self) -> Self
pub fn monthly_rotation(self) -> Self
pub fn yearly_rotation(self) -> Self
pub fn never_rotation(self) -> Self
pub fn size_limit(self, size_limit: u64) -> Self
pub fn max_backup(self, max_backup: usize) -> Self
pub fn max_age_days(self, max_age_days: usize) -> Self
pub fn compress(self, compress: bool) -> Self
pub fn symlink_latest(self, is_symlink: bool) -> Self
pub fn build(self) -> Result<FileAppender>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileAppenderBuilder
impl RefUnwindSafe for FileAppenderBuilder
impl Send for FileAppenderBuilder
impl Sync for FileAppenderBuilder
impl Unpin for FileAppenderBuilder
impl UnwindSafe for FileAppenderBuilder
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