Skip to content

Commit 771a6f1

Browse files
izolyomiestk
authored andcommitted
Removed environment mode after review.
1 parent d8361ef commit 771a6f1

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/lib.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -464,17 +464,8 @@ pub struct Handle {
464464
impl Handle {
465465
/// Sets the logging configuration.
466466
pub fn set_config(&self, config: Config) {
467-
self.reconfigure(config, EnvMode::Single)
468-
}
469-
470-
/// Sets the logging configuration with optionally adjusting the global logger settings through the `log`` crate.
471-
/// (log::LOGGER and log::MAX_LOG_LEVEL_FILTER)
472-
pub fn reconfigure(&self, config: Config, mode: EnvMode) {
473467
let shared = SharedLogger::new(config);
474-
match mode {
475-
EnvMode::Single => log::set_max_level(shared.root.max_log_level()),
476-
EnvMode::Multi => {}
477-
};
468+
log::set_max_level(shared.root.max_log_level());
478469
self.shared.store(Arc::new(shared));
479470
}
480471

@@ -484,14 +475,6 @@ impl Handle {
484475
}
485476
}
486477

487-
/// Logger environment mode used for reconfiguration
488-
pub enum EnvMode {
489-
/// Log4rs is the only single logger set as the global logger, e.g. using `init_file`, `init_config` or `log::set_boxed_logger()
490-
Single,
491-
/// Log4rs is working besides other logger(s) and is NOT the global logger
492-
Multi,
493-
}
494-
495478
#[cfg(test)]
496479
mod test {
497480
use log::{Level, LevelFilter, Log};

0 commit comments

Comments
 (0)