pub struct FileAppenderBuilder { /* private fields */ }
Expand description
A builder for FileAppender
s.
Implementations§
Source§impl FileAppenderBuilder
impl FileAppenderBuilder
Sourcepub fn encoder(self, encoder: Box<dyn Encode>) -> FileAppenderBuilder
pub fn encoder(self, encoder: Box<dyn Encode>) -> FileAppenderBuilder
Sets the output encoder for the FileAppender
.
Sourcepub fn append(self, append: bool) -> FileAppenderBuilder
pub fn append(self, append: bool) -> FileAppenderBuilder
Determines if the appender will append to or truncate the output file.
Defaults to true
.
Sourcepub fn build<P: AsRef<Path>>(self, path: P) -> Result<FileAppender>
pub fn build<P: AsRef<Path>>(self, path: P) -> Result<FileAppender>
Consumes the FileAppenderBuilder
, producing a FileAppender
.
The path argument can contain environment variables of the form $ENV{name_here},
where ‘name_here’ will be the name of the environment variable that
will be resolved. Note that if the variable fails to resolve,
$ENV{name_here} will NOT be replaced in the path.
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