Expand description
Bunyan formatting for slog-rs
#[macro_use]
extern crate slog;
extern crate slog_bunyan;
use slog::Drain;
use std::sync::Mutex;
fn main() {
let root = slog::Logger::root(
Mutex::new(
slog_bunyan::default(
std::io::stderr()
)
).fuse(),
o!("build-id" => "8dfljdf")
);
}Functionsยง
- default
- Create
slog_json::Formatwith bunyan key-values - new
- Create
slog_json::FormatBuilderwith bunyan key-values - with_
name - Create
slog_json::FormatBuilderwith keys for the bunyan core fields. The value of thenameparameter is used to populate the bunyannamefield.