예제 #1
0
def debug_logger():
    handler = logging.StreamHandler()
    logger.addHandler(handler)
    logger.setLevel(logging.DEBUG)

    yield

    logger.removeHandler(handler)
예제 #2
0
 def finish(self):
     logger.removeHandler(self.handler)