How to add color to your logs in 
It's easy as pie, just install
 
By default the
If you don't want to see log messages from libraries, you can pass a specific logger object to the
 
#log #logger #coloredlogs #logging #color
  python?It's easy as pie, just install
coloredlogs with pip and then:import coloredlogs, logging
logger = logging.getLogger(__name__)
coloredlogs.install(level='DEBUG')
# Some examples.
logger.debug("this is a debugging message")
logger.info("this is an informational message")
logger.warning("this is a warning message")
logger.error("this is an error message")
logger.critical("this is a critical message")
By default the
install() function installs a handler on the root logger, this means that log messages from your code and log         messages from the libraries that you use will all show up on the terminal.If you don't want to see log messages from libraries, you can pass a specific logger object to the
install() function. In this case  only log messages originating from that logger will show up on the terminal:coloredlogs.install(level='DEBUG', logger=logger)
#log #logger #coloredlogs #logging #color
