Skip to main content

Send log messages to remote syslog servers

Project description

# netsyslog3

netsyslog3 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.

netsyslog3 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 netsyslog3 adheres closely to that defined in [RFC 3164](http://tools.ietf.org/html/rfc3164).

## Installation

pip install netsyslog3

## Usage

$ python3 >>> import netsyslog3 >>> import syslog >>> logger = netsyslog3.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](http://hacksaw.sourceforge.net/netsyslog/doc/) are also available over on the (old) SourceForge site.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netsyslog3-0.1.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netsyslog3-0.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file netsyslog3-0.1.2.tar.gz.

File metadata

  • Download URL: netsyslog3-0.1.2.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

Hashes for netsyslog3-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8f9e3078a6e1db4b0191e005957afa98288b1d2da0a924edc58ee14d9bd06228
MD5 949275c21257481db959443d5dc60507
BLAKE2b-256 c86b59ca38291abc6b0966466b30780e4e2a7e56bde29802a5a9de98458ef89d

See more details on using hashes here.

File details

Details for the file netsyslog3-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: netsyslog3-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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

Hashes for netsyslog3-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ac8efbd809611bac3b011e95ac6d2cb7fdd7d538acd25b8214b277bdfb8db1
MD5 6cb647369e54d3556a47fbffb31ee67e
BLAKE2b-256 9ec7fcfa26edd33b6ca80c3f9f6fade08b7ef4e2ee2459a18a48022516f68202

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page