Skip to main content

LogFilterBackend

Trait LogFilterBackend 

Source
pub trait LogFilterBackend {
    // Required method
    fn enabled(&self, metadata: &Metadata<'_>) -> bool;

    // Provided method
    fn initialize(&self) { ... }
}
Expand description

Trait for a log filter backend that can be used with the EspIdfLogger.

Required Methods§

Source

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Check if logging for the given metadata is enabled.

Provided Methods§

Source

fn initialize(&self)

Initialize the log filter backend.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LogFilterBackend for ()

A log filter backend that does not consider the ESP-IDF configuration settings that control the log verbosity and does not filter anything.

This way, the control of the log verbosity from within Rust is completely disconnected from the log verbosity for the ESP-IDF native C code.

Source§

fn enabled(&self, _metadata: &Metadata<'_>) -> bool

Source§

impl<T> LogFilterBackend for &T

Source§

fn initialize(&self)

Source§

fn enabled(&self, metadata: &Metadata<'_>) -> bool

Implementors§