mirror of
https://github.com/alacritty/alacritty.git
synced 2025-02-17 15:57:08 -05:00
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.
This commit is contained in:
parent
6debc4f335
commit
0edac74e61
1 changed files with 1 additions and 0 deletions
|
@ -31,6 +31,7 @@ impl<T: Send + io::Write> Logger<T> {
|
|||
// 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<io::LineWriter<T>> {
|
||||
log::set_max_level(level);
|
||||
Logger {
|
||||
level,
|
||||
output: sync::Mutex::new(io::LineWriter::new(output))
|
||||
|
|
Loading…
Add table
Reference in a new issue