Skip to content

Instantly share code, notes, and snippets.

View stevenengler's full-sized avatar
🎃

Steven Engler stevenengler

🎃
View GitHub Profile
@mooware
mooware / colorstreamhandler.py
Last active July 20, 2023 16:16
Colored log output for Python logging framework. Works on Windows, Linux, and probably Mac as well.
# colored stream handler for python logging framework (use the ColorStreamHandler class).
#
# based on:
# http://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output/1336640#1336640
# how to use:
# i used a dict-based logging configuration, not sure what else would work.
#
# import logging, logging.config, colorstreamhandler
#