Crate slog_json

Source
Expand description

JSON Drain for slog-rs

#[macro_use]
extern crate slog;

use slog::Drain;
use std::sync::Mutex;

fn main() {
    let root = slog::Logger::root(
        Mutex::new(slog_json::Json::default(std::io::stderr())).map(slog::Fuse),
        o!("version" => env!("CARGO_PKG_VERSION"))
    );
}

Structsยง