How to use logging in Python with beautiful colors: Qlogging (Notebooks & Console)

Sinking Titanic
May 18, 2021

--

QLogging support notebooks

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")
How it looks like in terminal

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
How it looks in Windows

I love feedback, please share it here or as an issue in Github. If you find it useful, star & clap.

--

--

No responses yet