alisha17 · GitHub

Merged

Merged

Conversation

@alisha17

dtolnay

mrhota

///
/// This should be called early in the execution of a Rust program, and the
/// global logger may only be initialized once. Future initialization
/// attempts will return an error.
/// highest log level that the logger will not ignore.
/// highest log level that the logger wills not ignore.
///
/// This function may only be called once in the lifetime of a program. Any log
/// The `make_logger` closure is passed a `MaxLevel` object, which the
/// logger should use to keep the global maximum log level in sync with the
/// highest log level that the logger will not ignore.
/// highest log level that the logger wills not ignore.
}

#[cfg(feature = "use_std")]
pub fn try_set_logger<M>(make_logger: M) -> Result<(), SetLoggerError>
Box::new(Logger(me))
})
.unwrap();
try_set_logger(|max| {
fn main() {
let mut a = None;
set_logger(|max| {
try_set_logger(|max| {

pub fn init(&mut self) {
let logger = self.build();
let filter = max_level.set(logger.filter());

brson

Ok(()) => {}
Err(_) => panic!("global logger is already initialized"),
}
}

@alisha17

@alisha17

@brson

@brson brson mentioned this pull request

Jun 15, 2017

Closed

@brson

Alisha

@alisha17

Closed

@brson

EFanZh pushed a commit to EFanZh/log that referenced this pull request

Jul 23, 2023
…est-0.11.11
Bump reqwest from 0.11.10 to 0.11.11

Labels

None yet

Read the original on github.com ↗