Skip to content

Commit

Permalink
Use env_logger filters
Browse files Browse the repository at this point in the history
  • Loading branch information
IcanDivideBy0 committed Oct 15, 2021
1 parent 6217832 commit edf9085
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/ndjson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ use std::time;

/// Start logging.
pub(crate) fn start(filter: Filter) {
let max_level = filter.filter();
let logger = Box::new(Logger { filter });
log::set_boxed_logger(logger).expect("Could not start logging");
log::set_max_level(max_level);
}

#[derive(Debug)]
Expand Down
2 changes: 0 additions & 2 deletions src/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ const YELLOW: &'static str = "\x1b[33m";

/// Start logging.
pub(crate) fn start(filter: Filter) {
let max_level = filter.filter();
let logger = Box::new(Logger { filter });
log::set_boxed_logger(logger).expect("Could not start logging");
log::set_max_level(max_level);
}

#[derive(Debug)]
Expand Down
2 changes: 0 additions & 2 deletions src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ use std::collections::HashMap;

/// Start logging.
pub(crate) fn start(filter: Filter) {
let max_level = filter.filter();
let logger = Box::new(Logger { filter });
log::set_boxed_logger(logger).expect("Could not start logging");
log::set_max_level(max_level);
}

#[derive(Debug)]
Expand Down

0 comments on commit edf9085

Please sign in to comment.