Function defmt_decoder::log::init_logger

source ยท
pub fn init_logger(
    formatter: Formatter,
    host_formatter: HostFormatter,
    logger_type: DefmtLoggerType,
    should_log: impl Fn(&Metadata<'_>) -> bool + Sync + Send + 'static
)
Available on unstable only.
Expand description

Initializes a log sink that handles defmt frames.

Defmt frames will be printed to stdout, other logs to stderr.

The caller has to provide a should_log closure that determines whether a log record should be printed.