log::macros::debug![src]

macro_rules! debug(
    ($($arg:tt)*) => (if cfg!(not(ndebug)) { log!(::log::DEBUG, $($arg)*) })
)

A convenience macro for logging at the debug log level. This macro can also be omitted at compile time by passing --cfg ndebug to the compiler. If this option is not passed, then debug statements will be compiled.

Example

#![feature(phase)] #[phase(plugin, link)] extern crate log; fn main() { debug!("x = {x}, y = {y}", x=10i, y=20i); }
#![feature(phase)]
#[phase(plugin, link)] extern crate log;

debug!("x = {x}, y = {y}", x=10i, y=20i);