Send log messages to remote syslog servers
Project description
netsyslog enables you to construct syslog messages and send them (via UDP) to a remote syslog server directly from Python. Unlike other syslog modules it allows you to set the metadata (e.g. time, host name, program name, etc.) yourself, giving you full control over the contents of the UDP packets that it creates.
netsyslog was initially developed for the Hack Saw project, where it was used to read log messages from a file and inject them into a network of syslog servers, whilst maintaining the times and hostnames recorded in the original messages.
The module also allows you to send log messages that contain the current time, local hostname and calling program name (i.e. the typical requirement of a logging package) to one or more syslog servers.
The format of the UDP packets sent by netsyslog adheres closely to that defined in [RFC 3164][].
[RFC 3164]: http://tools.ietf.org/html/rfc3164
Installation
$ python setup.py install
Usage
$ python Python 2.4.1 (#2, Mar 30 2005, 21:51:10) [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 Type “help”, “copyright”, “credits” or “license” for more information. >>> import netsyslog >>> import syslog >>> logger = netsyslog.Logger() >>> logger.add_host(“somehost.mydomain.com”) >>> logger.add_host(“otherhost.mydomain.com”) >>> logger.log(syslog.LOG_USER, syslog.LOG_NOTICE, “Hey, it works!”, pid=True)
The [API docs][] are also available over on the (old) SourceForge site.
[API docs]: http://hacksaw.sourceforge.net/netsyslog/doc/
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 netsyslog3-0.1.1.tar.gz.
File metadata
- Download URL: netsyslog3-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.0.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d19790512a585cd4bc8c06fd54d009215b5b0310825d5f9e668a522114d5cf9
|
|
| MD5 |
ac6297781a8e85ceae72162e09409403
|
|
| BLAKE2b-256 |
f222bbbb2cf7e30652bf830204197164d0cc8715f675e649e91f40d97209f8f6
|
File details
Details for the file netsyslog3-0.1.1-py3-none-any.whl.
File metadata
- Download URL: netsyslog3-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.0.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e873924997a300883ceff4ec5dd8ec51cf183eae7545c03d1d5de66380277679
|
|
| MD5 |
e33e55592c729acf6c082f7fb96e6998
|
|
| BLAKE2b-256 |
c87a33064c0e9df0c20697c21de114f6828beb800db44bb50d41443497610bf6
|