Registry / devops / rfc5424-logging-handler

rfc5424-logging-handler

JSON →
library1.4.3pypypi✓ verified 86d ago

An up-to-date, RFC5424-Compliant syslog handler for the Python logging framework. Current version 1.4.3. Release cadence is low; last release was in 2019.

pip install rfc5424-logging-handler
INSTALL
IMPORT
SIG · RFC5424-LOGGING-HA
R
rfc5424-logging-handler
devopspythonv1.4.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Rfc5424SysLogHandler
from rfc5424logging import Rfc5424SysLogHandler

Basic setup for logging to a syslog server via RFC5424.

import logging from rfc5424logging import Rfc5424SysLogHandler handler = Rfc5424SysLogHandler( host='localhost', port=514, facility=logging.handlers.SysLogHandler.LOG_USER, app_name='myapp' ) logger = logging.getLogger() logger.addHandler(handler) logger.setLevel(logging.INFO) logger.info('Test message')
Debug
Known issues
gotchaThe library name on PyPI is 'rfc5424-logging-handler' but the import package is 'rfc5424logging'. Do not use 'import rfc5424_logging_handler'.
fix
Use 'from rfc5424logging import Rfc5424SysLogHandler'.
affects: all
deprecatedThis library has not been updated since 2019. It may have unpatched issues with newer Python versions (e.g., 3.9+).
fix
Consider using alternative libraries like 'logging.handlers.SysLogHandler' with RFC5424 formatting or 'syslog-rfc5424-formatter'.
affects: 1.4.3
gotchaThe handler sends UDP by default. TCP is not supported out of the box.
fix
If you need TCP, you must subclass and implement your own transport.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'rfc5424_logging_handler'
Import path mismatch: package name is 'rfc5424logging', not 'rfc5424_logging_handler'.
fix
Correct import: from rfc5424logging import Rfc5424SysLogHandler
AttributeError: module 'logging' has no attribute 'handlers'
Missing import of logging.handlers for SysLogHandler constants.
fix
Add 'import logging.handlers' before using logging.handlers.SysLogHandler.LOG_USER.
Upgrade
Version history
1.4.3latest on PyPI · released May 19, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
rfc5424-logging-handler — pip install rfc5424-logging-handler · libregistry