log::error!
[-]
[+]
[src]
macro_rules! error( ($($arg:tt)*) => (log!(::log::ERROR, $($arg)*)) )
A convenience macro for logging at the error log level.
Example
#![feature(phase)] #[phase(plugin, link)] extern crate log; fn main() { let error = 3u; error!("the build has failed with error code: {}", error); }#![feature(phase)] #[phase(plugin, link)] extern crate log; fn main() { let error = 3u; error!("the build has failed with error code: {}", error); }
Assumes the binary is main:
$ RUST_LOG=error ./main
ERROR:main: the build has failed with error code: 3