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

#622 in Unix APIs

Download history 218/week @ 2024-07-19 142/week @ 2024-07-26 158/week @ 2024-08-02 268/week @ 2024-08-09 127/week @ 2024-08-16 123/week @ 2024-08-23 171/week @ 2024-08-30 207/week @ 2024-09-06 139/week @ 2024-09-13 122/week @ 2024-09-20 144/week @ 2024-09-27 99/week @ 2024-10-04 94/week @ 2024-10-11 89/week @ 2024-10-18 72/week @ 2024-10-25 74/week @ 2024-11-01

347 downloads per month
Used in 8 crates (4 directly)

MPL-2.0 license

13KB
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

~1–1.3MB
~22K SLoC