#syslog #rfc5424 #serde #parser #ietf

syslog_rfc5424

Parser for RFC5424 (IETF-format) syslog messages

11 unstable releases

0.7.0 Sep 25, 2020
0.6.1 Jan 19, 2019
0.6.0 Jul 14, 2018
0.4.0 Oct 24, 2017
0.2.0 Feb 23, 2016
Download history 83/week @ 2021-05-30 67/week @ 2021-06-06 99/week @ 2021-06-13 82/week @ 2021-06-20 88/week @ 2021-06-27 59/week @ 2021-07-04 84/week @ 2021-07-11 134/week @ 2021-07-18 98/week @ 2021-07-25 76/week @ 2021-08-01 72/week @ 2021-08-08 63/week @ 2021-08-15 112/week @ 2021-08-22 57/week @ 2021-08-29 57/week @ 2021-09-05 74/week @ 2021-09-12

536 downloads per month
Used in rsyslog

ISC license

41KB
901 lines

This module implements an RFC 5424 IETF Syslog Protocol parser in Rust.

Build Status Documentation crates.io

This tool supports serializing the parsed messages using serde if it's built with the serde-serialize feature.

This library is licensed under the ISC license, a copy of which can be found in LICENSE.txt

The minimum supported Rust version for this library is 1.34.

Performance

On a recent system1, a release build takes approximately 8µs to parse an average message and approximately 300ns to parse the smallest legal message. Debug timings are a bit worse -- about 60µs for an average message and about 8µs for the minimal message. A single-threaded Syslog server should be able to parse at least 100,000 messages/s, as long as you run a separate thread for the parser.

This compares very favorably to python syslog-rfc5424-parser2, which takes about 300µs for a minimal message, and more than 700µs for an average message.

Footnotes

  • 1: An Intel i7-4850HQ in a 2013 rMBP
  • 2: Which I also wrote

Dependencies

~0.6–1.4MB
~31K SLoC