Lightweight logging utility for python. Wrapper around stdlib
Project description
kLogs
Small logging utility for uniform format, color
Features:
- Easy to use log format language
- Search
- Open source at line
- log and assert
Installation
pip install klogs-util
Usage
from klogs import get_logger
log = get_logger(tag, level, outfile)
log.debug("debug statement")
log.info("info statement")
log.warning("warning statement")
log.error("error statement")
log.critical("critical statement")
Output:
<tag> - DEBUG - debug message (test.py:7)
<tag> - INFO - info message (test.py:8)
<tag> - WARNING - warning message (test.py:9)
<tag> - ERROR - error message (test.py:10)
<tag> - CRITICAL - critical message (test.py:11)
Stack (most recent call last):
File "/Users/kevin/coding/kLogs/test.py", line 26, in <module>
test(args.file, args.level)
File "/Users/kevin/coding/kLogs/test.py", line 11, in test
log.critical("critical message")
Or
log()
x = 10
log(x)
Which will produce:
<tag> - INFO - (test.py:12)
<tag> - INFO - x | 10 (test.py:14)
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
klogs_util-0.2.0.tar.gz
(15.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file klogs_util-0.2.0.tar.gz.
File metadata
- Download URL: klogs_util-0.2.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
624d642891dd64fa94a2f1ac0eb02f0645cb91f81f02b9d3900bda73a8089a23
|
|
| MD5 |
26eeb03b116f4a3d703f547d272e05ea
|
|
| BLAKE2b-256 |
c59c45bff5956233eec202a8fd61d5b606a536bfd69ac8c731d5c0e732878796
|
File details
Details for the file klogs_util-0.2.0-py3-none-any.whl.
File metadata
- Download URL: klogs_util-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd1e6eceebf269449b68a86f845a1430289c6bb5d2d9ac0999b4b935ce517ec7
|
|
| MD5 |
5a817564094d9f2559d8a9fc4f59af93
|
|
| BLAKE2b-256 |
d878ee1caae9111ba0596293840c8010d2ce2f91782584a045b4dde194d08a39
|