class_docstr: Provides access and control of log capturing.
class_docstr_tok: ["Provides","access","and","control","of","log","capturing","."]
docstr: Finalizes the fixture.
  
  This restores the log levels changed by :meth:`set_level`.
docstr_tok: ["Finalizes","the","fixture",".","This","restores","the","log","levels","changed","by",":","meth",":","`","set_level","`","."]
code: def _finalize(self):
      """Finalizes the fixture.
  
      This restores the log levels changed by :meth:`set_level`.
      """
      # restore log levels
      for logger_name, level in self._initial_log_levels.items():
          logger = logging.getLogger(logger_name)
          logger.setLevel(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 2 for calling the LogCaptureFixture obj's underlying member method code with example usage: obj._finalize() without return types