Macro mt_logger::mt_log [−][src]
macro_rules! mt_log {
($log_level : expr, $($fmt_args : expr), *) => { ... };
}
Expand description
Sends a message to be logged at the specified logging level.
Arguments after $log_level
follow the format of println!
arguments.
Note
A call to this macro will only send the message to the logging thread. It does NOT guarantee that the message will be delivered at any time.
If all messages must be logged at a given time, see mt_flush!
.
Examples
Logs a Debug
-level message with the content, “No response received after 500ms”.
let timeout = 500;
mt_log!(Level::Debug, "No response received after {}ms", timeout);