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('systlogtest')
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfa6ab6b4b7271738dc73bb855f41bbd7e25e8eb8978bd4c24f6f0754aa72970 |
|
MD5 | 6b5e4fe1d63b23a4a765a582e8b8c1ef |
|
BLAKE2b-256 | be57da7db44c9568ad8a64031bb33e92bf4603cf7c38dedea3b34b420d615032 |
Close
Hashes for rfc5424_logging_handler-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a0955e08cc5a521936e716eaedfb8f9492ae8c80a124fe367f3d4e7e6cfc017 |
|
MD5 | f75ea4b24c1324783d1a62dfc3a674df |
|
BLAKE2b-256 | c1c079976e3d3e46aa1e863272d3e101620a449388521b3454338950cde9932e |