xmpd/src/logger.rs
2024-09-14 00:23:48 +03:00

14 lines
276 B
Rust

use log::LevelFilter;
pub fn init_logger(debug: bool) {
let level = if debug {
LevelFilter::Debug
} else {
LevelFilter::Info
};
env_logger::builder()
.format_timestamp(None)
.filter_level(level)
.init();
}