fabaccess-bffh/src/log.rs
Gregor Reitzenstein 1041afd0ab Network'd
2020-12-01 10:21:39 +01:00

13 lines
361 B
Rust

use slog::{Drain, Logger};
use slog_async;
use slog_term::{TermDecorator, FullFormat};
use crate::config::Settings;
pub fn init() -> Logger {
let decorator = TermDecorator::new().build();
let drain = FullFormat::new(decorator).build().fuse();
let drain = slog_async::Async::new(drain).build().fuse();
return slog::Logger::root(drain, o!());
}