flexi_logger 0.10.4

An easy-to-configure and flexible logger that writes logs to stderr and/or to files. It allows custom logline formats, and it allows changing the log specification at runtime. It also allows defining additional log streams, e.g. for alert or security messages.
Documentation
extern crate flexi_logger;
#[macro_use]
extern crate log;

use flexi_logger::{detailed_format, Logger};

#[test]
fn test_detailed_files_dscr() {
    let handle = Logger::with_str("info")
        .format(detailed_format)
        .log_to_file()
        .discriminant("foo")
        .start_reconfigurable()
        .unwrap_or_else(|e| panic!("Logger initialization failed with {}", e));

    error!("This is an error message");
    warn!("This is a warning");
    info!("This is an info message");
    debug!("This is a debug message - you must not see it!");
    trace!("This is a trace message - you must not see it!");
    handle.validate_logs(&[
        ("ERROR", "test_detailed_files_dscr", "error"),
        ("WARN", "test_detailed_files_dscr", "warning"),
        ("INFO", "test_detailed_files_dscr", "info"),
    ]);
}