From 0edac74e61a780afeb5c2f55cfe20d2267bdda2a Mon Sep 17 00:00:00 2001 From: Harlan Lieberman-Berg Date: Thu, 22 Mar 2018 21:06:12 -0400 Subject: Explicitly call log::set_max_level (Closes: #1201) For some reason, log 0.4 requires that we explicitly set the log level with log::set_max_level or it defaults to Off. The documentation isn't clear but suggests we must do this in addition to doing the filtration ourselves in the Log impl. --- src/logging.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/logging.rs b/src/logging.rs index 421223e8..5691eb78 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -31,6 +31,7 @@ impl Logger { // False positive, see: https://github.com/rust-lang-nursery/rust-clippy/issues/734 #[cfg_attr(feature = "clippy", allow(new_ret_no_self))] pub fn new(output: T, level: log::LevelFilter) -> Logger> { + log::set_max_level(level); Logger { level, output: sync::Mutex::new(io::LineWriter::new(output)) -- cgit v1.2.3