Crate slog_journald[][src]

Expand description

Journald drain for slog-rs

Since Journald supports structured data, structured data passed to slog is simply forwarded to Journald as structured data.

This crate supports specialized handling of logged errors via features. Look into Cargo.toml for more information.


extern crate slog;
extern crate slog_journald;

use slog::*;
use slog_journald::*;

fn main() {
    let root = Logger::root(JournaldDrain.ignore_res(), o!("build_di" => "12344"));
    info!(root, "Testing journald"; "foo" => "bar");


Drain records and send to journald as structured data.


Error type for logging to journald.