A small library to write to local syslog.
syslog is available on crates.io and can be included in your Cargo enabled project like this:
toml
[dependencies]
syslog = "~1.1.0"
Reference documentation is available here.
```rust extern crate syslog;
use syslog::{Facility,Severity};
fn main() { match syslog::unix(Facility::LOGUSER) { Err(e) => println!("impossible to connect to syslog: {:?}", e), Ok(mut writer) => { let r = writer.send(Severity::LOGALERT, String::from("hello world")); if r.is_err() { println!("error sending the log {}", r.err().expect("got error")); } } } } ```