pub trait Policy: Sync + Send + 'static + Debug {
// Required methods
fn process(&self, log: &mut LogFile<'_>) -> Result<()>;
fn is_pre_process(&self) -> bool;
}
Expand description
A trait implementing a rolling policy for a RollingFileAppender
.
Required Methods§
sourcefn process(&self, log: &mut LogFile<'_>) -> Result<()>
fn process(&self, log: &mut LogFile<'_>) -> Result<()>
Rolls the current log file, if necessary.
This method is called after each log event. It is provided a reference to the current log file.
sourcefn is_pre_process(&self) -> bool
fn is_pre_process(&self) -> bool
Return the config Trigger.is_pre_process
value