File: test_no_logger.rs

package info (click to toggle)
rust-flexi-logger 0.29.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,084 kB
  • sloc: makefile: 2
file content (17 lines) | stat: -rw-r--r-- 496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use flexi_logger::Logger;
use log::*;

#[test]
fn you_must_not_see_anything() {
    Logger::try_with_str("trace")
        .unwrap()
        .do_not_log()
        .start()
        .unwrap();

    error!("This is an error message - you must not see it!");
    warn!("This is a warning - you must not see it!");
    info!("This is an info message - you must not see it!");
    debug!("This is a debug message - you must not see it!");
    trace!("This is a trace message - you must not see it!");
}