sysly 0.1.0

A modern multi-transport syslog appender.
docs.rs failed to build sysly-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: sysly-0.2.4

sysly

Build Status

syslog, srsly

a syslog udp and unix domain socket appender.

install

Add the following to your Cargo.toml

[dependencies]
sysly = "0.1.0"

usage

The interface is straight forward. First create a new Syslog instance optionally configuring with a Facility and tag, then start logging messages with methods which correlate to severities including: debug, info, notice, warn, err, critical, alert, and emergency.

#![feature(net)]
extern crate sysly;

use sysly::{ Facility, Syslog };
use std::net::{ IpAddr, SocketAddr };

fn main() {
  let host = SocketAddr::new(IpAddr::new_v4(127,0,0,1), 514);
  let mut syslog = Syslog::udp(host).facility(Facility::LOCAL3).host("foo.local").app("test");
  match syslog.info("Hello syslog. I'm rust.") {
    Err(e) => panic!("error sending -- {}", e),
    Ok(_) => println!("sent")
  };
}

Doug Tangren (softprops) 2015