rivet-logger 0.1.0

Rivet framework crates and adapters.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::{BoxError, LogRecord};

pub trait Handler: Send + Sync {
    fn is_handling(&self, _record: &LogRecord) -> bool {
        true
    }

    /// Returning true stops bubbling the record through remaining handlers.
    fn handle(&self, record: LogRecord) -> Result<bool, BoxError>;

    fn close(&self) -> Result<(), BoxError> {
        Ok(())
    }

    fn reset(&self) -> Result<(), BoxError> {
        Ok(())
    }
}