A more up-to-date, RFC5424-Compliant syslog handler for the Python logging framework
Project description
A more up-to-date, RFC 5424 compliant syslog handler for the Python logging framework
Free software: BSD License
Features
RFC 5424 Compliant
No need for complicated formatting strings
Installation
Python package:
pip install rfc5424-logging-handler
Usage
After installing you can use this package like this:
import logging
from rfc5424logging import Rfc5424SysLogHandler
logger = logging.getLogger('syslogtest')
logger.setLevel(logging.INFO)
sh = Rfc5424SysLogHandler(address=('10.0.0.1', 514))
logger.addHandler(sh)
msg_type = 'interesting'
logger.info('This is an %s message', msg_type)
This will send the following message to the syslog server:
<14>1 2020-01-01T05:10:20.841485+01:00 myserver syslogtest 5252 - - This is an interesting message
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
Close
Hashes for rfc5424-logging-handler-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f58bd77ee3b2d59a81acdacd0054186de8a34816ed2ad241c9caff0c58f40f3c |
|
MD5 | dd96bc66102ff07168b407181a5dc98a |
|
BLAKE2b-256 | becfefacf0105637bd00d6cd02465be97896c56bbc7e084c371ecabb8ca07be6 |
Close
Hashes for rfc5424_logging_handler-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2908b7788db3e0de40486e60447558088b6f45e860dabc9d13c2f642f30eac1c |
|
MD5 | a5b44eb8334eff1d52b332a14534832f |
|
BLAKE2b-256 | 41e81d34a80df5b363b4b337bb78e0aed1a0081ea6d4207a5a15c2741e74f366 |