class_docstr: Provides access and control of log capturing.
class_docstr_tok: ["Provides","access","and","control","of","log","capturing","."]
docstr: 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.
docstr_tok: ["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","."]
code: def at_level(self, level, logger=None):
      """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.
      """
      logger = logging.getLogger(logger)
      orig_level = logger.level
      logger.setLevel(level)
      try:
          yield
      finally:
          logger.setLevel(orig_level)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  import re
  from contextlib import contextmanager
  import py
  import six
  import pytest
  from _pytest.compat import dummy_context_manager
  from _pytest.config import create_terminal_writer
  from _pytest.pathlib import Path
label_desc: Use image node_id 11 for calling the LogCaptureFixture obj's underlying member method code with example usage: obj.at_level(level, logger) without return types