sloop.log.LoggingLevelContext

class sloop.log.LoggingLevelContext(level, logger=None)[source]

Temporarily change the logging level within a context

Example

>>> with LoggingLevelContext(logging.WARNING) as logger:
>>> ... logger.warning("warning level here")
__init__(level, logger=None)[source]

Methods