mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 14:57:56 +01:00
12 lines
332 B
Rust
12 lines
332 B
Rust
use slog::{Drain, Logger};
|
|
use slog_async;
|
|
use slog_term::{TermDecorator, FullFormat};
|
|
|
|
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!());
|
|
}
|