Tools for better logging
This module provides
a function to a logger configured for logging with color-coded log levels:
get_colorlog()
a context manager allowing changing log levels per context:
Logging
Usage:
>>> from clldutils.loglib import Logging, get_colorlog
>>> log = get_colorlog(__name__)
>>> log.debug('nothing to see')
>>> with Logging(log, level=logging.DEBUG):
... log.debug('but now')
DEBUG but now