An up-to-date, RFC5424-Compliant syslog handler for the Python logging framework
Project description
Python rfc5424 syslog logging handler
This is a fork of a package with a logging handler with support for the RFC 5424 standard.
RFC 5424 (syslog structured data) compliant syslog handler for the Python logging framework.
- Free software: BSD License
- Homepage
- Original documentation
Installation
pip install syslog-sd-logging
Usage
After installing you can use this package like this:
import logging
from syslog_sd_logging import Rfc5424SysLogHandler
logger = logging.getLogger('syslogtest')
logger.setLevel(logging.INFO)
sh = Rfc5424SysLogHandler(address=('10.0.0.1', 514))
logger.addHandler(sh)
logger.info('This is an interesting message', extra={'msgid': 'some_unique_msgid'})
This will send the following message to the syslog server::
<14>1 2020-01-01T05:10:20.841485+01:00 myserver syslogtest 5252 some_unique_msgid - \xef\xbb\xbfThis is an interesting message
Note the UTF8 Byte order mark (BOM) preceding the message. While required by
RFC 5424 section 6.4 if the message is known to be UTF-8 encoded,
there are still syslog receivers that cannot handle it. To bypass this limitation, when initializing the handler Class,
set the msg_as_utf8 parameter to False like this:
sh = Rfc5424SysLogHandler(address=('10.0.0.1', 514), msg_as_utf8=False)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file syslog_sd_logging-0.1.1.tar.gz.
File metadata
- Download URL: syslog_sd_logging-0.1.1.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6b86e3f23b43dfe1710474a47da38bd3944497503194df8c6d5b86119ae308
|
|
| MD5 |
69dd484a8257f15aea9f528d5e6d22c0
|
|
| BLAKE2b-256 |
d1a35840b59cb261ec8e390958e88f823050b5fd11c33cf86637ab625e38f32b
|
Provenance
The following attestation bundles were made for syslog_sd_logging-0.1.1.tar.gz:
Publisher:
release.yml on redb0/syslog-sd-logging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syslog_sd_logging-0.1.1.tar.gz -
Subject digest:
5b6b86e3f23b43dfe1710474a47da38bd3944497503194df8c6d5b86119ae308 - Sigstore transparency entry: 1518486207
- Sigstore integration time:
-
Permalink:
redb0/syslog-sd-logging@ec15de6e8bfb303f8255b913ee8529e63bf86698 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/redb0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ec15de6e8bfb303f8255b913ee8529e63bf86698 -
Trigger Event:
push
-
Statement type:
File details
Details for the file syslog_sd_logging-0.1.1-py3-none-any.whl.
File metadata
- Download URL: syslog_sd_logging-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d0b3a6f058b25a5d371ddb588511136bd994b4e5a6d79217e41a0f5e07cfa8b
|
|
| MD5 |
fe3a61d81d65bf869208610c9f19e585
|
|
| BLAKE2b-256 |
995082086cf7e8e1e3f77aead5a97318956ab1d08d6757a83aada117c5ebfb6b
|
Provenance
The following attestation bundles were made for syslog_sd_logging-0.1.1-py3-none-any.whl:
Publisher:
release.yml on redb0/syslog-sd-logging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syslog_sd_logging-0.1.1-py3-none-any.whl -
Subject digest:
3d0b3a6f058b25a5d371ddb588511136bd994b4e5a6d79217e41a0f5e07cfa8b - Sigstore transparency entry: 1518486231
- Sigstore integration time:
-
Permalink:
redb0/syslog-sd-logging@ec15de6e8bfb303f8255b913ee8529e63bf86698 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/redb0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ec15de6e8bfb303f8255b913ee8529e63bf86698 -
Trigger Event:
push
-
Statement type: