You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
491 B
17 lines
491 B
use std::env;
|
|
|
|
#[test]
|
|
fn config_log_level() {
|
|
// Environment variables should be overwritten by config values.
|
|
env::set_var("RUST_LOG", "debug");
|
|
|
|
let init_result = logger::init(
|
|
logger::Config::default()
|
|
.with_min_level(log::Level::Trace));
|
|
|
|
assert_eq!(init_result, true);
|
|
// Setting the level through the Config struct should impact both host and device
|
|
assert_eq!(log::max_level(), log::LevelFilter::Trace);
|
|
|
|
env::remove_var("RUST_LOG");
|
|
} |