4 stable releases

Uses old Rust 2015

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

#15 in #systemd

Download history 59/week @ 2021-08-08 78/week @ 2021-08-15 138/week @ 2021-08-22 43/week @ 2021-08-29 68/week @ 2021-09-05 77/week @ 2021-09-12 85/week @ 2021-09-19 88/week @ 2021-09-26 188/week @ 2021-10-03 190/week @ 2021-10-10 87/week @ 2021-10-17 66/week @ 2021-10-24 173/week @ 2021-10-31 112/week @ 2021-11-07 121/week @ 2021-11-14 78/week @ 2021-11-21

458 downloads per month
Used in 4 crates (3 directly)

MPL-2.0/MIT/Apache-2.0 and LGPL-2.1-or-later WITH GCC-exception-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

~240KB

Sn]