pub trait LogProcessor: Send + Sync + Debug {
    // Required methods
    fn emit(&self, data: LogData);
    fn force_flush(&self) -> LogResult<()>;
    fn shutdown(&mut self) -> LogResult<()>;
    fn event_enabled(&self, level: Severity, target: &str, name: &str) -> bool;
}
Available on crate feature logs only.
Expand description

The interface for plugging into a Logger.

Required Methods§

source

fn emit(&self, data: LogData)

Called when a log record is ready to processed and exported.

source

fn force_flush(&self) -> LogResult<()>

Force the logs lying in the cache to be exported.

source

fn shutdown(&mut self) -> LogResult<()>

Shuts down the processor.

source

fn event_enabled(&self, level: Severity, target: &str, name: &str) -> bool

Available on crate feature logs_level_enabled only.

Check if logging is enabled

Implementors§