VT100 logging for Python
Project description
vt100logging
The original logging package lacks basic coloring of the log output. This does not help when one tries to quickly check on the real time console feed.
vt100logging is a simple wrapper around logging. Using VT100 escape codes it colors the log feed.
Supported OS
Tested on MS Win11 and Ubuntu.
Installation
pip install -U vt100logging
How to use it
Simple use case
from vt100logging import vt100logging_init, D, I, W, E
vt100logging_init('LOGGED-MODULE', is_verbose=True)
D('example DEBUG message')
I('example INFO message')
W('example WARNING message')
E('example ERROR message')
Extract more information from exception
from vt100logging import EX
...
except Exception as e:
EX(e)
...
Store log into file on the side:
from vt100logging import vt100logging_init, I
vt100logging_init('my-module', store_to_log_file=True)
I("Logging both to console AND log file")
Contribution
If something is wrong, you can raise issues here.
Copyright
Created by Grzegorz Grzęda. Distributed under MIT license
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
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 vt100logging-1.1.0.tar.gz.
File metadata
- Download URL: vt100logging-1.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a81b15e6cc2201b2fd85c37bc6bb73d107da7db29468aa408ac500035661961
|
|
| MD5 |
78ab3ef78e06cf266923f3f955d73f84
|
|
| BLAKE2b-256 |
c80c2ee02ae805b2e3578fe088211bae7718143f4c0ae7479a53ab6a9ae7b2dc
|
File details
Details for the file vt100logging-1.1.0-py3-none-any.whl.
File metadata
- Download URL: vt100logging-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fba5be4c9e5e5e7c7ae331c69693110b77047946fe0dc680747526d3de623151
|
|
| MD5 |
e0180440d38b2fe3ff163cdec174a7ec
|
|
| BLAKE2b-256 |
876886b2e7bcf1d3c50e46953d6fa1f4bcf6985191e6a85f5e317db95e5bbde4
|