7 releases

Uses old Rust 2015

0.2.4 May 22, 2015
0.2.3 May 13, 2015
0.2.2 Apr 6, 2015
0.2.1 Mar 27, 2015
0.0.2 Feb 25, 2015

#28 in #syslog

40 downloads per month

MIT license

12KB
237 lines

sysly

Build Status

syslog, srsly

a syslog udp and unix domain socket appender.

docs

Find them here

install

Add the following to your Cargo.toml

[dependencies]
sysly = "0.2.4"

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.

extern crate sysly;

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

fn main() {
  let host = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(127,0,0,1), 514));
  let mut syslog = Syslog::udp(host).facility(Facility::LOCAL3).host("foo.local").app("test");
  syslog.info("Hello syslog. I'm rust. Pleased to meet you")
}

Doug Tangren (softprops) 2015

Dependencies

~0.7–1MB
~16K SLoC