#syslog #messages #parser #heroku #drain #logplex

syslog_heroku

Parser for Heroku (Logplex) syslog messages

1 unstable release

Uses old Rust 2015

0.1.0 Feb 28, 2018

#7 in #heroku

ISC license

13KB
265 lines

This module implements a Heroku (Logplex) syslog parser, which is useful when implementing a Logplex HTTP Drain.

Build Status


lib.rs:

This module implements a parser for Heroku (Logplex) syslog messages, which is useful when implementing a Logplex HTTP Drain.

These syslog messages are similar to RFC5424 messages, with the notable exception that they leave out STRUCTURED-DATA but do not replace it with a NILVALUE.

Usually, you'll just use the FromStr trait on the Message struct to parse a message.

Example

use syslog_heroku::Message;

fn main() {
    let msg = "<45>1 2018-02-28T09:30:53.345547+00:00 host heroku web.1 - Process exited with status 143"
        .parse::<Message>().unwrap();
    println!("{:?} {:?} {:?}", msg.severity, msg.hostname, msg.msg);
}

Dependencies

~1MB
~19K SLoC