Hierarchical Colored Logger Module for Python
HCLogger is a logging module using Termcolor and a hierarchical format to improve readability.
Note: this module was designed to deal with concurrency. However, it is encouraged to store thread logs into different log files.
Installation
pip install hclogger
Usage
As simple as it could be:
from HCLogger import Logger
logger = Logger(filename='fname.log', verbose=False)
logger.debug('This is a debug message.')
Output:
The hierarchy is added to functions. In order to add hierarchy on of the following alternatives must be used:
# The manual call
logger.manual_log_func(func, args*)
# The decorated call
@logger.log_func
def func(args):
...
func()
Output:
Putting it all together:
Future work
- Add to PyPi
- Create web view
Release files for hclogger 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hclogger-1.0.4.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hclogger-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / hclogger-1.0.4.tar.gz
| Download URL | hclogger-1.0.4.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bd654f89759535252feff3b1259e4dcfbe9bb02743abb946e780ee8bdfd80aa
|
|
BLAKE2b-256 checksum How to use checksums |
065b0f055f226aceed85a15306fb90dc8224c7d8d861ab3ca135dacbf9251cf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Release files / hclogger-1.0.4-py3-none-any.whl
| Download URL | hclogger-1.0.4-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2f8bfe239202ea5ad00d1b6f2a4c516f12eeab57b1e882604c822be9378f5db
|
|
BLAKE2b-256 checksum How to use checksums |
4a367fb80ee6a50ad83e4163306f328ab624aafa80cbbb94f804469240093823
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|