Skip to main content

helper for easy logging when you're used to print

Project description

My logging helper library

Quicklogging is intended for 2 purposes:

  • shrink the boilerplate I need before I can log something by a few bits,

  • help code overhauling from quick and dirty print’ing scripts to enterprise class software that can log.

What quicklogging does

Quicklogging provides you with handy loggers named after the current module.

This allows for silencing or raising the logging level for a specific part or a whole hierarchy of (sub-)packages (ie. folders, in Python’s slang).

Quicklogging can catch print. This means that the working code can stay as-is and still get logged

import quicklogging

# Catches prints in the current module
quicklogging.catch_prints()

# Catches prints everywhere in the Python process
quicklogging.catch_prints(catch_all=True)

What quicklogging does NOT

Quicklogging does not configure the logging formatting or output as this would not save any line; here is a basic example for general purpose code: Quick survival guide with the logging module <https://quicklogging.readthedocs.io/en/latest/logging_survival.html>_.

Quicklogging quality

Quicklogging is covered by a test suite and has been working for years for me, but I wouldn’t promise there is no bug.

I have tried documenting the code but would welcome proofreading; the API may change after discussion.

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

quicklogging-0.3.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

quicklogging-0.3.1-py2.py3-none-any.whl (6.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file quicklogging-0.3.1.tar.gz.

File metadata

  • Download URL: quicklogging-0.3.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for quicklogging-0.3.1.tar.gz
Algorithm Hash digest
SHA256 65833ba0644560a61aab84852e7f216b58ce6e1a16023e1d5acc5ef2113d94f6
MD5 9a57f11c9f6bcaeb57dca933c5e1fbad
BLAKE2b-256 5664d141e078aef813a0b42e6632229728331b066a0cd15ae4dc2fbf34ef7d35

See more details on using hashes here.

Provenance

File details

Details for the file quicklogging-0.3.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for quicklogging-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 20c433ebf83db14326593dfb4fc596ddd4f0dfaab6e2195c3fde5879b6e92908
MD5 c608c34d142ffcdb5228a36a90c58c04
BLAKE2b-256 5a736b10bdc2cb3c96c5ee8881a821681b0c6d4258dd455350e967739ab49009

See more details on using hashes here.

Provenance

Supported by

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