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

#605 in Unix APIs

Download history 105/week @ 2024-03-13 96/week @ 2024-03-20 99/week @ 2024-03-27 102/week @ 2024-04-03 73/week @ 2024-04-10 101/week @ 2024-04-17 115/week @ 2024-04-24 82/week @ 2024-05-01 103/week @ 2024-05-08 108/week @ 2024-05-15 111/week @ 2024-05-22 169/week @ 2024-05-29 158/week @ 2024-06-05 185/week @ 2024-06-12 154/week @ 2024-06-19 92/week @ 2024-06-26

605 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
~21K SLoC