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.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: neatlogger-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 cc40ebcca4ca1fa46a4ee20ab99db74ae1431320e36f02bf4e50220ab290c04c
MD5 fbc3843264a60aa4b60cebd902e98935
BLAKE2b-256 498f962f488d543e5423cfdda22bb15f57957ab41f8d78feb57fbd131144ab26

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: neatlogger-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4caa1324a9c9f6743d99e6215d1d37a244464df028f38a8687901e6563a006b
MD5 073e1aa710d2c25f93cbb395be6eece5
BLAKE2b-256 59f32ce2e06f02908d1bd756212da56c11d8a005ded1e27368990b1a761cd2ca

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