fabaccess-bffh/src/log.rs

13 lines
379 B
Rust
Raw Normal View History

2020-02-14 12:20:17 +01:00
use slog::{Drain, Logger};
use slog_async;
use slog_term::{TermDecorator, FullFormat};
2020-09-15 14:31:10 +02:00
use crate::config::Settings;
2020-02-14 12:20:17 +01:00
2020-09-15 14:31:10 +02:00
pub fn init(_config: &Settings) -> Logger {
2020-02-14 12:20:17 +01:00
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!());
}