log::warn!
[−]
[src]
macro_rules! warn { ($($arg:tt)*) => { ... }; }
Unstable (
rustc_private
): use the crates.io log
library instead
A convenience macro for logging at the warning log level.
Examples
#![feature(rustc_private)] #[macro_use] extern crate log; fn main() { let code = 3; warn!("you may like to know that a process exited with: {}", code); }#[macro_use] extern crate log; fn main() { let code = 3; warn!("you may like to know that a process exited with: {}", code); }
Assumes the binary is main
:
$ RUST_LOG=warn ./main
WARN:main: you may like to know that a process exited with: 3