init_with_target_level.rs 302 B

123456789101112
  1. use log::LevelFilter;
  2. use simple_logger::SimpleLogger;
  3. fn main() {
  4. SimpleLogger::new()
  5. .with_level(LevelFilter::Info)
  6. .with_module_level("init_with_target_level", LevelFilter::Off)
  7. .init()
  8. .unwrap();
  9. log::info!("This will NOT be logged. (Target disabled)");
  10. }