Skip to main content

syslogger

A quick program to write to a specified log facility at a specified log level.

I originally wrote this so I had a way to quickly and easily test my syslog-ng configuration. Of course there were probably already programs that would do this, but for whatever dumb reason, I couldn’t find them. (logger came to mind much later - http://unixhelp.ed.ac.uk/CGI/man-cgi?logger+1.) On the bright side, it gave me the opportunity to mock the Python logging class for my unit test, using Gary Bernhardt’s Dingus library. https://github.com/garybernhardt/dingus. I also used his Expecter library again. Big thanks to Gary. He’s been my goto for Python + TDD.

Installation:

Syslogger is in pypi at http://pypi.python.org/pypi/Syslogger/. To install, simply use pip.

` pip install syslogger `

or maybe

` sudo pip install --upgrade syslogger `

Use:

syslogger runs from the command line.

` syslogger FACILITY LEVEL [--address ADDRESS] MESSAGE `

where FACILITY is one of:

  • AUTH

  • AUTHPRIV

  • CRON

  • DAEMON

  • FTP

  • KERN

  • LPR

  • MAIL

  • NEWS

  • SYSLOG

  • USER

  • UUCP

  • LOCAL0

  • LOCAL1

  • LOCAL2

  • LOCAL3

  • LOCAL4

  • LOCAL5

  • LOCAL6

  • LOCAL7

and LEVEL is one of:

  • DEBUG

  • INFO

  • WARNING

  • ERROR

  • CRITICAL

and ADDRESS is the address of the socket that your system logger is listening to (defaults to /dev/log),

and MESSAGE is the message you’d like to log.

API:

If you think syslogger might make your Python logging easier, feel free to use it in your code too.

` from syslogger.syslogger import Syslogger l = Syslogger(level="CRITICAL", facility="AUTH", address="/dev/log") l.log("Hello world, love syslogger") `

Metadata

Release files for Syslogger 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Syslogger 0.0.4
File Size Uploaded Provenance
Syslogger-0.0.4.tar.gz 3.8 kB Without provenance Details

Release files / Syslogger-0.0.4.tar.gz

Download URL Syslogger-0.0.4.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e1df0d92f85255ae513e7ca4227767076e51da62f360c0699a3283930e37c35a
BLAKE2b-256 checksum
How to use checksums
8e0c25c74877e130a5ec788307ef8607027c400ab7b6f1d343ccc63a6d974773
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Syslogger 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page