Macro log::error [] [src]

macro_rules! error {
    ($($arg:tt)*) => { ... };
}
🔬 This is a nightly-only experimental API. (rustc_private)

use the crates.io log library instead

A convenience macro for logging at the error log level.

Examples

#[macro_use] extern crate log;

fn main() {
    let error = 3;
    error!("the build has failed with error code: {}", error);
}Run

Assumes the binary is main:

$ RUST_LOG=error ./main
ERROR:main: the build has failed with error code: 3