Macro log::warn
[−]
[src]
macro_rules! warn { ($($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 warning log level.
Examples
#[macro_use] extern crate log; fn main() { let code = 3; warn!("you may like to know that a process exited with: {}", code); }Run
Assumes the binary is main
:
$ RUST_LOG=warn ./main
WARN:main: you may like to know that a process exited with: 3