set_level!() { /* proc-macro */ }Expand description
Set the logging level for this Logger instance.
The default level is INFO.
§Parameters
level- The required logging level.
§Examples
#[logger]
pub fn my_func(msg: &str){
entering!("msg: {msg}");
fine!("Everything is just fine!");
// ...
}
fn main(){
set_level!(Level::FINER);
let msg = "Just some text to work with.";
my_func(msg);
}
Output:
|flogging->my_func| [FINER ] Entry: (msg: Just some text to work with.)
|flogging->my_func| [FINE ] Everything is just fine!