|
pub fn try_apply(self) -> Result<(), log::SetLoggerError> { |
|
let logger = Logger::new(self.dispatches); |
|
log::set_boxed_logger(Box::new(logger))?; |
|
log::set_max_level(self.max_level); |
|
Ok(()) |
|
} |
Since rust-lang/log#664 introduce a logger param for log macros, perhaps we can see how to expose the configured logger (dispatcher pipeline).
So far, our builder is an inflight config for setting up the global logger, and the max_level option is meaningless for a standalone logger.
logforth/src/logger/builder.rs
Lines 153 to 158 in 6cfe443
Since rust-lang/log#664 introduce a logger param for log macros, perhaps we can see how to expose the configured logger (dispatcher pipeline).
So far, our builder is an inflight config for setting up the global logger, and the
max_leveloption is meaningless for a standalone logger.