log4rs-rolling-file 0.2.0

A rolling file appender for log4rs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Policies.
use std::error::Error;
use std::fmt;

use LogFile;

pub mod compound;

/// A trait implementing a rolling policy for a `RollingFileAppender`.
pub trait Policy: Sync + Send + 'static + fmt::Debug {
    /// 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.
    fn process(&self, log: &mut LogFile) -> Result<(), Box<Error>>;
}