[][src]Macro geng_core::prelude::log::log

macro_rules! log {
    (target: $target:expr, $lvl:expr, $message:expr) => { ... };
    (target: $target:expr, $lvl:expr, $($arg:tt)+) => { ... };
    ($lvl:expr, $($arg:tt)+) => { ... };
}

The standard logging macro.

This macro will generically log with the specified Level and format! based argument list.

Examples

This code runs with edition 2018
use log::{log, Level};

let data = (42, "Forty-two");
let private_data = "private";

log!(Level::Error, "Received errors: {}, {}", data.0, data.1);
log!(target: "app_events", Level::Warn, "App warning: {}, {}, {}",
    data.0, data.1, private_data);