opensmtpd-filter-dkimout/src/logs.rs

11 lines
286 B
Rust
Raw Normal View History

2023-03-21 13:00:44 +01:00
use env_logger::{Builder, Env, Target};
pub fn init_log_system() {
let env = Env::new()
.filter_or(crate::LOG_LEVEL_ENV_VAR, "warn")
.write_style_or(crate::LOG_STYLE_ENV_VAR, "never");
let mut builder = Builder::from_env(env);
builder.target(Target::Stderr);
builder.init();
}