LoggingTarget

Trait LoggingTarget 

Source
pub trait LoggingTarget {
    // Required methods
    fn should_log(&self, level: LoggingLevel) -> bool;
    fn notify_log(
        &self,
        level: LoggingLevel,
        data: Value,
        logger: Option<String>,
        meta: Option<HashMap<String, Value>>,
    );
}
Expand description

Trait for logging targets that can check levels and send messages

Required Methods§

Source

fn should_log(&self, level: LoggingLevel) -> bool

Check if this target should receive a message at the given level

Source

fn notify_log( &self, level: LoggingLevel, data: Value, logger: Option<String>, meta: Option<HashMap<String, Value>>, )

Send a log message to this target

Implementors§