Struct log4rs::append::rolling_file::RollingFileAppenderBuilder
source · pub struct RollingFileAppenderBuilder { /* private fields */ }
Expand description
A builder for the RollingFileAppender
.
Implementations§
source§impl RollingFileAppenderBuilder
impl RollingFileAppenderBuilder
sourcepub fn append(self, append: bool) -> RollingFileAppenderBuilder
pub fn append(self, append: bool) -> RollingFileAppenderBuilder
Determines if the appender will append to or truncate the log file.
Defaults to true
.
sourcepub fn encoder(self, encoder: Box<dyn Encode>) -> RollingFileAppenderBuilder
pub fn encoder(self, encoder: Box<dyn Encode>) -> RollingFileAppenderBuilder
Sets the encoder used by the appender.
Defaults to a PatternEncoder
with the default pattern.
sourcepub fn build<P>(
self,
path: P,
policy: Box<dyn Policy>
) -> Result<RollingFileAppender>
pub fn build<P>( self, path: P, policy: Box<dyn Policy> ) -> Result<RollingFileAppender>
Constructs a RollingFileAppender
.
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 !RefUnwindSafe for RollingFileAppenderBuilder
impl Send for RollingFileAppenderBuilder
impl Sync for RollingFileAppenderBuilder
impl Unpin for RollingFileAppenderBuilder
impl !UnwindSafe for RollingFileAppenderBuilder
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