Created
May 24, 2020 14:38
-
-
Save davidohana/0338d06b09e7d4ad26fcfa56f3dcdb58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from colargulog import ColorizedArgsFormatter | |
root_logger = logging.getLogger() | |
console_handler = logging.StreamHandler(stream=sys.stdout) | |
console_format = "%(asctime)s - %(levelname)-8s - %(name)-25s - %(message)s" | |
colored_formatter = ColorizedArgsFormatter(console_format) | |
console_handler.setFormatter(colored_formatter) | |
root_logger.addHandler(console_handler) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment