Skip to content

About

A small Python module to parse RFC5424-formatted Syslog messages

Resources

Code of conduct

Contributing

Security policy

Stars

37 stars

Watchers

47 watching

Forks

Repository files navigation

This module implements an RFC 5424 IETF Syslog Protocol parser in Python, using the lark parser-generator. It should work on Python 3.3+.

CI PyPI version Documentation Status

The file example_syslog_server.py contains a fully-functional Syslog server which will receive messages on a UNIX domain socket and print them to stdout as JSON blobs.

A word on performance

On a fairly modern system (Xeon E3-1270v3), it takes about 230µs to parse a single syslog message and construct a SyslogMessage object (which is to say, you should be able to parse about 4300 per second with a single-threaded process). Are you really in that much of a rush, anyway?

If you're interested in a faster, non-Python alternative, you may also enjoy rust-syslog-rfc5424.

About

A small Python module to parse RFC5424-formatted Syslog messages

Resources

Code of conduct

Contributing

Security policy

Stars

37 stars

Watchers

47 watching

Forks

Releases

Packages

Used by

Contributors

Languages