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§

source

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.

source

fn is_pre_process(&self) -> bool

Return the config Trigger.is_pre_process value

Trait Implementations§

source§

impl Deserializable for dyn Policy

source§

fn name() -> &'static str

Returns a name for objects implementing the trait suitable for display in error messages. Read more

Implementors§