1 use std::env;
2 
3 #[test]
config_log_level()4 fn config_log_level() {
5     // Environment variables should be overwritten by config values.
6     env::set_var("RUST_LOG", "debug");
7 
8     let init_result = logger::init(
9         logger::Config::default()
10             .with_min_level(log::Level::Trace));
11 
12     assert_eq!(init_result, true);
13     // Setting the level through the Config struct should impact both host and device
14     assert_eq!(log::max_level(), log::LevelFilter::Trace);
15 
16     env::remove_var("RUST_LOG");
17 }