@contextmanager<EOL><INDENT>def at_level(self, level, logger=None):<DEDENT>
logger = logging.getLogger(logger)<EOL>orig_level = logger.level<EOL>logger.setLevel(level)<EOL>try:<EOL><INDENT>yield<EOL><DEDENT>finally:<EOL><INDENT>logger.setLevel(orig_level)<EOL><DEDENT>
Context manager that sets the level for capturing of logs. After the end of the 'with' statement the
        level is restored to its original value.

        :param int level: the logger to level.
        :param str logger: the logger to update the level. If not given, the root logger level is updated.