macro_rules! log {
($t:expr, $($x:expr),*) => { ... };
([info] $($x:expr),*) => { ... };
([warn] $($x:expr),*) => { ... };
([error] $($x:expr),*) => { ... };
([fatal] $($x:expr),*) => { ... };
}Expand description
Logs to stderr, accepts multiple arguments.
Usage example:
use urs::log;
urs::log!(log::LogType::WARN, "This number is odd: {}!", 5);
urs::log!([info] "Info attribute");
urs::log!([fatal] "This log will be logged with the {} type {}", "Fatal",
"using [fatal] in the log! macro and exit afterwards");There are attributes for each logging method:
- [info]
- [warn]
- [error]
- [fatal]