ros666Macro warn
Source macro_rules! warn {
($fmt:expr) => { ... };
($fmt:expr, $($arg:tt)*) => { ... };
}
Expand description
warn! 宏用于打印带有黄色警告标签的日志消息。
warn!("This is a warning message.");
warn!("This is a warning message with arguments: {}", 42);
$fmt: 格式化字符串,用于指定日志消息的内容。
$($arg:tt)*: 可选参数,用于格式化字符串中的占位符。
warn!("Disk space is low.");
warn!("User {} has logged in.", "Alice");