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 oflogger
- 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("")
Install
pip install neatlogger
Requires:
- loguru
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file neatlogger-0.1.2.tar.gz
.
File metadata
- Download URL: neatlogger-0.1.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.11 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67698315498515f4e0938953176fde93f739144d9f32660f7453a3c94611bdcf |
|
MD5 | 4cae7e4960dabbc90d4c6b98314f3062 |
|
BLAKE2b-256 | c6b83b3e9454d198e0833c487bd462f58810755c4d5c7f8aba7a465dbf3c5e05 |
File details
Details for the file neatlogger-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: neatlogger-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.11 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7db9af8958939d2b8be133b9ef9f81b8948cb9c8f6f95d61cf7bd23751064d8 |
|
MD5 | 0d10b4cd2b31de3510a785e9d496c85e |
|
BLAKE2b-256 | fcb7ee5ed21e04fe8ac215dbc02bffcb0b6999d1b0c16805c5c3d9d72fd1ef77 |