All Projects → jobec → rfc5424-logging-handler

jobec / rfc5424-logging-handler

Licence: BSD-3-Clause license
An RFC5424-Compliant Syslog Handler for the Python Logging Framework

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to rfc5424-logging-handler

tinysyslog
A tiny and simple syslog server with log rotation in Go. Works with Docker and Kubernetes.
Stars: ✭ 26 (-38.1%)
Mutual labels:  syslog, rfc5424
nsyslog-parser
Syslog Parser. Accepts RFC 3164 (BSD) and RFC 5424 formats
Stars: ✭ 14 (-66.67%)
Mutual labels:  syslog, rfc-5424
Logbert
Logbert is an advanced log message viewer for log4net, log4j and others.
Stars: ✭ 70 (+66.67%)
Mutual labels:  syslog
NLog.Targets.Syslog
A Syslog server target for NLog
Stars: ✭ 63 (+50%)
Mutual labels:  syslog
Captainslog
A Syslog Protocol Parser
Stars: ✭ 130 (+209.52%)
Mutual labels:  syslog
Punt
Punt is a tiny and lightweight daemon which helps ship logs to Elasticsearch.
Stars: ✭ 98 (+133.33%)
Mutual labels:  syslog
Quicklogger
Library for logging on files, console, memory, email, rest, eventlog, syslog, slack, telegram, redis, logstash, elasticsearch, influxdb, graylog, Sentry, Twilio, ide debug messages and throw events for Delphi/Firemonkey/freepascal/.NET (Windows/Linux/OSX/IOS/Android).
Stars: ✭ 137 (+226.19%)
Mutual labels:  syslog
Nim Morelogging
Logging library for Nim
Stars: ✭ 29 (-30.95%)
Mutual labels:  syslog
LogESP
Open Source SIEM (Security Information and Event Management system).
Stars: ✭ 162 (+285.71%)
Mutual labels:  syslog
Docker Logger
Logs collector for docker
Stars: ✭ 126 (+200%)
Mutual labels:  syslog
Sagan
** README ** This repo has MOVED to https://github.com/quadrantsec/sagan
Stars: ✭ 236 (+461.9%)
Mutual labels:  syslog
Syslogparser
A Syslog parser for the Go programming language
Stars: ✭ 113 (+169.05%)
Mutual labels:  syslog
Rsyslog
a Rocket-fast SYStem for LOG processing
Stars: ✭ 1,385 (+3197.62%)
Mutual labels:  syslog
Go Logger
一个简单而强大的 golang 日志工具包,支持同步和异步输出到 命令行,文件, api 接口,文件支持按文件大小,文件行数,日期切分;A simple and powerful golang logging toolkit that supports synchronous and asynchronous output to the console, file, API interfaces, file support by file size, file line number, date sharding.
Stars: ✭ 152 (+261.9%)
Mutual labels:  syslog
Logtrail
Kibana plugin to view, search & live tail log events
Stars: ✭ 1,343 (+3097.62%)
Mutual labels:  syslog
Syslog
An Arduino library for logging to Syslog server in IETF format (RFC 5424) and BSD format (RFC 3164)
Stars: ✭ 105 (+150%)
Mutual labels:  syslog
Pm2 Syslog
PM2 module to redirect application logs to syslog
Stars: ✭ 34 (-19.05%)
Mutual labels:  syslog
Syslog Ng
syslog-ng is an enhanced log daemon, supporting a wide range of input and output methods: syslog, unstructured text, queueing, SQL & NoSQL.
Stars: ✭ 1,555 (+3602.38%)
Mutual labels:  syslog
Documentation
Stars: ✭ 133 (+216.67%)
Mutual labels:  syslog
WPWatcher
Wordpress Watcher is a wrapper for WPScan that manages scans on multiple sites and reports by email and/or syslog. Schedule scans and get notified when vulnerabilities, outdated plugins and other risks are found.
Stars: ✭ 34 (-19.05%)
Mutual labels:  syslog

Python rfc5424 syslog logging handler

Documentation Status https://travis-ci.org/jobec/rfc5424-logging-handler.svg?branch=master https://codecov.io/github/jobec/rfc5424-logging-handler/coverage.svg?branch=master

An up-to-date, RFC 5424 compliant syslog handler for the Python logging framework.

Features

  • RFC 5424 Compliant.
  • Python Logging adapter for easier sending of rfc5424 specific fields.
  • No need for complicated formatting strings.
  • TLS/SSL syslog support.
  • Alternate transports like streams (ex. stderr, stdout, file, ...).

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)

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)

For more examples, have a look at the documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].