Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/homeworkprod/syslogmp
A parser for BSD syslog protocol (RFC 3164) messages
https://github.com/homeworkprod/syslogmp
parser python rfc-3164 syslog
Last synced: 3 months ago
JSON representation
A parser for BSD syslog protocol (RFC 3164) messages
- Host: GitHub
- URL: https://github.com/homeworkprod/syslogmp
- Owner: homeworkprod
- License: mit
- Created: 2015-08-10T10:23:21.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2021-05-06T02:28:50.000Z (almost 4 years ago)
- Last Synced: 2023-03-23T03:26:48.252Z (almost 2 years ago)
- Topics: parser, python, rfc-3164, syslog
- Language: Python
- Homepage: https://homework.nwsnet.de/releases/76d6/#syslogmp
- Size: 55.7 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
syslogmp
========A parser for BSD syslog protocol (RFC 3164) messages
This library was extracted from syslog2IRC_.
Requirements
------------- Python 3.7+
Installation
------------Install this package via pip_:
.. code:: sh
$ pip install syslogmp
Usage
-----To parse a syslog message:
.. code:: python
from syslogmp import parse
# Parse data (usually received via network).
message = parse(data)# Let's see what we've got here.
print(message.facility)
print(message.facility.description)
print(message.severity)
print(message.timestamp)
print(message.hostname)
print(message.message)Further Reading
---------------For more information, see `RFC 3164`_, "The BSD syslog Protocol".
Please note that there is `RFC 5424`_, "The Syslog Protocol", which
obsoletes `RFC 3164`_. This package, however, only implements the
latter... _syslog2IRC: http://homework.nwsnet.de/releases/c474/#syslog2irc
.. _pip: http://www.pip-installer.org/
.. _RFC 3164: http://tools.ietf.org/html/rfc3164
.. _RFC 5424: http://tools.ietf.org/html/rfc5424:Copyright: 2007-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.