macro_rules! log_level {
($name:ident, $level:expr) => { ... };
}
Expand description
Registers a new log level.
§Arguments
name
- The identifier to store the level at. This will be the name of the level and the name used to access it.logger
- The level to register and store.
§Returns
A module containing everything needed for the level.
§Examples
log_level!(ALERT, LogLevel::new(30));
fn main() {
log!(ALERT, "This is an alert!");
}