How to use logging in Python with beautiful colors: Qlogging (Notebooks & Console)
May 18, 2021
I was looking for logging library that support logging to console & notebook, logging to a file and beautifully colored in both console and notebook, I could find it; hence I made one. Details below:
Source: Github
Install:
pip install qlogging
Example:
import qlogging
logger = qlogging.get_logger(level='debug')
logger.debug("This is debug")
logger.info("This is info")
logger.warning("This is warning")
logger.error("This is an error")
logger.critical("This is a critical")
Key features:
- Color logging in Terminal and
- Color logging in Jupyter Notebook and Jupyter
- Color logging in Kaggle
- Color logging in Google Colab
- Know which function the logger was called
- Know while line number the logger was called
- Support logging to a
- Simple and clean
- Customizable
I love feedback, please share it here or as an issue in Github. If you find it useful, star & clap.