mtlog
Multi-threaded logger with support for progress bars and log files. //!
Usage
// Cargo.toml
...
[]
= "0.1.0"
use logger_config;
logger_config
.init_global;
info!;
sleep; // wait for log to flush
Multi-threaded logging
use logger_config;
logger_config
.with_name
.init_global;
info!;
for i in 0..5
sleep; // wait for log to flush
Logging to files
Files can be used to log messages. The log file is created if it does not exist and appended to if it does. Threads can log to different files. If no file is specified in local config, the global file is used.
use logger_config;
logger_config
.with_log_file
.expect
.no_stdout // disable stdout logging if needed
.init_global;
info!;
sleep; // wait for log to flush
assert!;
Progress bar
A progress bar implementation is provided. Multiple progress bars can be created and updated concurrently without interfering with each other and regular logs
use ;
logger_config
.init_global;
let pb = new;
for i in 0..100
pb.finish;