4 stable releases

2.1.1 Sep 3, 2019
2.1.0 Sep 2, 2019
2.0.0 May 13, 2017
1.0.0 Nov 8, 2016

#68 in Debugging

Download history 181/week @ 2019-05-21 244/week @ 2019-05-28 477/week @ 2019-06-04 74/week @ 2019-06-11 98/week @ 2019-06-18 18/week @ 2019-06-25 21/week @ 2019-07-02 28/week @ 2019-07-09 25/week @ 2019-07-16 21/week @ 2019-07-23 26/week @ 2019-07-30 10/week @ 2019-08-06 32/week @ 2019-08-13 40/week @ 2019-08-20 38/week @ 2019-08-27

248 downloads per month
Used in 3 crates (2 directly)

MPL-2.0/MIT/Apache-2.0

13KB
194 lines

slog-journald

Build Status Gitter Documentation

This is a straightforward journald drain for slog-rs.

Journald and slog-rs work very well together since both support structured log data. This crate will convert structured data (that is, key-value pairs) into journald fields. Since, journald field names are more restrictive than keys in slog-rs, key names are sanitized to be valid journald fields.


lib.rs:

Journald drain fro slog-rs

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

Examples

#[macro_use]
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");
}

Dependencies

~220KB