1 unstable release
Uses old Rust 2015
0.1.0 | Feb 28, 2018 |
---|
#11 in #heroku
13KB
265 lines
This module implements a Heroku (Logplex) syslog parser, which is useful when implementing a Logplex HTTP Drain.
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