[][src]Crate slog_bunyan

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::Format with bunyan key-values

new

Create slog_json::FormatBuilder with bunyan key-values

with_name

Create slog_json::FormatBuilder with keys for the bunyan core fields. The value of the name parameter is used to populate the bunyan name field.