pub trait SharedLogger: Log {
// Required methods
fn level(&self) -> LevelFilter;
fn config(&self) -> Option<&Config>;
fn as_log(self: Box<Self>) -> Box<dyn Log>;
}
Expand description
Trait to have a common interface to obtain the Level of Loggers
Necessary for CombinedLogger to calculate the lowest used Level.
Required Methods§
Sourcefn level(&self) -> LevelFilter
fn level(&self) -> LevelFilter
Returns the set Level for this Logger
§Examples
let logger = SimpleLogger::new(LevelFilter::Info, Config::default());
println!("{}", logger.level());