[][src]Type Definition imxrt_uart_log::Filter

type Filter = (&'static str, Option<LevelFilter>);

Filter log messages by module name (&'static str) to a log level

  • if the level is None, log at all levels from the module (subject to the max log level)
  • if the level is not None, that will be the base log level for the module

Example

use imxrt_uart_log::Filter;
use log::LevelFilter;

static LEVELS: &'static [Filter] = &[
    // Writes messages from the 'i2c' module subject to the max log level
    ("i2c", None),
    // Writes only Error- and Warn-level messages from the 'spi' module
    ("spi", Some(LevelFilter::Warn)),
];