macro_rules! debug {
(tag: $tag:expr, $($arg:tt)*) => { ... };
($($arg:tt)*) => { ... };
}Expand description
Logs a debug message using Level::DEBUG.
Compiled out entirely in release builds (when debug_assertions is
disabled), so there is no runtime cost in production. Accepts the same
syntax as format!. An optional tag: argument places a context label
at the start of the line.
ยงExamples
debug!("parsed {} tokens", count);
debug!(tag: "parser", "state = {:?}", state);