Skip to main content

Neat adaptions to the loguru package which wraps logging in python.

Project description

Neatlogger

Neat adaptions to the loguru package which wraps logging in python.

Idea

This wrapper around loguru shortcuts your way to more simple usage of loggers, especially useful in small, production-ready scripts:

  • Provides the shorthand log instead of logger
  • Provides new levels: NEW, PROGRESS, READ, WRITE, DONE.
  • Formats logger outputs more cleanly, skips unnecessary information.

Example usage:

from neatlogger import log

log.new("Welcome to my script")
log.trace("Some minor tracing message")
x = 42
log.debug("Let's debug value x={}", x)
log.info("By the way, it's going well so far.")
log.progress("Heavy calculation ahead...")
log.read("Reading in some data...")
log.write("Writing some output file...")
log.warning("Note that writing files could take some time!")
try:
    x / 0
except Exception as e:
    log.error("An error occured: {}", e)
log.success("Yey, found a solution to the problem eventually.")
log.done("")

Example output

Install

pip install neatlogger

Requires:

  • loguru

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

neatlogger-0.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

neatlogger-0.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file neatlogger-0.1.1.tar.gz.

File metadata

  • Download URL: neatlogger-0.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.11 Windows/10

File hashes

Hashes for neatlogger-0.1.1.tar.gz
Algorithm Hash digest
SHA256 806ca49e301b522b6edde93791da3292071a1e16e35029671d3a7a8ed0e81112
MD5 f3b7e308d2ead9f32923d9530082a9c6
BLAKE2b-256 1fbfa3f3f81cf0a428cbf25baab93c71a2db2ac94b0dbd12d58ab5bd3e5a4a21

See more details on using hashes here.

Provenance

File details

Details for the file neatlogger-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: neatlogger-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.11 Windows/10

File hashes

Hashes for neatlogger-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05c589b22ce4fea6ba825d788b20425f8c3a86b3f49c94fb37d0d3668a364a87
MD5 11552083944c236ba0d8d9ced39b28b9
BLAKE2b-256 7448ae3479e4f3940ed4dad0d1dfcac85cee2c27167bceca26e6b6b71fc65a35

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