Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A hierarchical and colourful logging module

Project description

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.

HCLogger capture

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:

Debug 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:

Function logging

Putting it all together:

Demo capture

Future work

  • <input type="checkbox" checked="" disabled="" /> Add to PyPi
  • <input type="checkbox" disabled="" /> Create web view

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hclogger, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size hclogger-1.0.4-py3-none-any.whl (15.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size hclogger-1.0.4.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page