10 releases (breaking)

1.0.0-alpha9.1 Feb 7, 2017
1.0.0-alpha9 Oct 18, 2016
1.0.0-alpha8 Sep 20, 2016
0.13.0 Oct 15, 2021
0.6.0 Jul 19, 2016

#2 in #structured-logging

Download history 667/week @ 2022-04-13 595/week @ 2022-04-20 611/week @ 2022-04-27 610/week @ 2022-05-04 794/week @ 2022-05-11 745/week @ 2022-05-18 666/week @ 2022-05-25 903/week @ 2022-06-01 440/week @ 2022-06-08 562/week @ 2022-06-15 386/week @ 2022-06-22 412/week @ 2022-06-29 389/week @ 2022-07-06 475/week @ 2022-07-13 455/week @ 2022-07-20 596/week @ 2022-07-27

1,992 downloads per month
Used in 5 crates (3 directly)

MPL-2.0 license

12KB
270 lines

Travis CI Build Status slog-syslog on crates.io slog-rs Gitter Chat

slog-syslog - Syslog drain for slog-rs

For more information, help, to report issues etc. see slog-rs.


lib.rs:

Syslog drain for slog-rs

extern crate slog;
extern crate slog_syslog;

use slog::*;
use slog_syslog::Facility;

fn main() {
    let o = o!("build-id" => "8dfljdf");

    // log to a local unix sock `/var/run/syslog`
    match slog_syslog::SyslogBuilder::new()
        .facility(Facility::LOG_USER)
        .level(slog::Level::Debug)
        .unix("/var/run/syslog")
        .start() {
        Ok(x) => {
            let root = Logger::root(x.fuse(), o);
        },
        Err(e) => println!("Failed to start syslog on `var/run/syslog`. Error {:?}", e)
    };
}

Dependencies

~1MB
~16K SLoC