#syslog #rfc-5424 #message-parser #ietf #protocols

syslog_rfc5424

Parser for RFC5424 (IETF-format) syslog messages

13 releases (7 breaking)

0.9.0 Jul 15, 2022
0.8.0 Jan 28, 2022
0.7.0 Sep 25, 2020
0.6.1 Jan 19, 2019
0.2.0 Feb 23, 2016

#7 in #syslog

Download history 33/week @ 2024-06-10 20/week @ 2024-06-17 10/week @ 2024-06-24 27/week @ 2024-07-01 18/week @ 2024-07-08 18/week @ 2024-07-15 36/week @ 2024-07-22 61/week @ 2024-07-29 154/week @ 2024-08-05 113/week @ 2024-08-12 25/week @ 2024-08-19 40/week @ 2024-08-26 35/week @ 2024-09-02 14/week @ 2024-09-09 28/week @ 2024-09-16 60/week @ 2024-09-23

142 downloads per month
Used in rsyslog

ISC license

44KB
949 lines

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

CI 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

~1–1.7MB
~34K SLoC