Skip to main content

A parser for BSD syslog protocol (RFC 3164) messages

Project description

syslogmp

A parser for BSD syslog protocol (RFC 3164) messages

This library was extracted from syslog2IRC.

Requirements

  • Python 3.6+

Installation

Install this package via pip:

$ pip install syslogmp

Usage

To parse a syslog message:

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.

Copyright:

2007-2021 Jochen Kupperschmidt

License:

MIT, see LICENSE for details.

syslogmp Changelog

Version 0.3

Released 2021-03-03

  • Removed support for end-of-life Python versions 2.7, 3.3, 3.4, and 3.5.

  • Added support for Python 3.6, 3.7, 3.8, and 3.9.

Version 0.2.2

Released 2016-03-01

  • Fixed datetime.strptime failing on February 29th. (Tests introduce a test depedency on FreezeGun).

Version 0.2.1

Released 2015-09-08

  • Added missing files to distribution.

Version 0.2

Released 2015-09-07

  • Data is required to be a byte string.

  • Raise custom exception on message parsing errors instead of using assertions.

  • Raise exception if message is too long instead of truncating and processing it.

Version 0.1.1

Released 2015-08-10

  • Fixed packaging issue.

Version 0.1

Released 2015-08-10

  • first official release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syslogmp-0.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

syslogmp-0.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file syslogmp-0.3.tar.gz.

File metadata

  • Download URL: syslogmp-0.3.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.3

File hashes

Hashes for syslogmp-0.3.tar.gz
Algorithm Hash digest
SHA256 0bbbf5c8d2b65c2fe87c775a52268bad17726166e620fe767d62337f07a62c7c
MD5 c89206e795dcd172fdeb6b379cc0e0fc
BLAKE2b-256 b2703b2618988475c424c33bf9e4443b76a0d7c1a0a3a794d6d6aee9893811b9

See more details on using hashes here.

File details

Details for the file syslogmp-0.3-py3-none-any.whl.

File metadata

  • Download URL: syslogmp-0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.3

File hashes

Hashes for syslogmp-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4f974ae1746b0904d0ebda3cc7909fd5f2d46fb9241b0160425ded7a1f80b296
MD5 a136278c60a8f61f10d053c085281f8e
BLAKE2b-256 9aafce9ff4bbe782c7faccd9cdb672de0af73c0269cb75de2732cd123f708e14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page