This module implements an RFC 5424 IETF Syslog Protocol parser in Python, using the lark parser-generator. It should work on Python 2.7 or Python 3.3+.
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.
Release files for syslog-rfc5424-parser 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| syslog-rfc5424-parser-0.3.2.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| syslog_rfc5424_parser-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / syslog-rfc5424-parser-0.3.2.tar.gz
| Download URL | syslog-rfc5424-parser-0.3.2.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80a9239d4da404a271266000f4c5f00a183af3d03d53d19d7052c8272430bee9
|
|
BLAKE2b-256 checksum How to use checksums |
d57241a79804360b6c85665ecca2b477ac85a1ffdd28fca3e84591e5ef542d87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5
|
Release files / syslog_rfc5424_parser-0.3.2-py3-none-any.whl
| Download URL | syslog_rfc5424_parser-0.3.2-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6134ee1958da89ab7f8d32ed5370a49ddabcc99d75a950b6ec59708417f20a7a
|
|
BLAKE2b-256 checksum How to use checksums |
371ed9a9969174e3b28cae3e6dde024eedbaf66696d530377ede107c9495ffc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5
|