durylog 0.1.2

An easy to use library to implements logging on stdout, file or both.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use durylog::{error,warn,info,debug,trace,DLog};

fn main() {
    DLog::new()
        .with_color() // Enable colors in console output (default disabled)
        .widh_timestamp_format("%Y-%m-%d %H:%M:%S") // Change default timestamp
        .widh_custom_separator(" | ") // Change default separator pattern for items
        .with_file("log-custom.log").unwrap() // Enable logging on file (default disable)
        .init_logger().ok();

    error!("Error message");
    warn!("Warning message");
    info!("Info message");
    debug!("Debug message");
    trace!("Trace message");
}