class_docstr: Context manager for logging level.
  
  Parameters
  ----------
  %(verbose)s
  %(add_frames)s
  
  See Also
  --------
  mne.verbose
  
  Notes
  -----
  See the :ref:`logging documentation <tut-logging>` for details.
  
  Examples
  --------
  >>> from mne import use_log_level
  >>> from mne.utils import logger
  >>> with use_log_level(False):
  ...     # Most MNE logger messages are "info" level, False makes them not
  ...     # print:
  ...     logger.info('This message will not be printed')
  >>> with use_log_level(True):
  ...     # Using verbose=True in functions, methods, or this context manager
  ...     # will ensure they are printed
  ...     logger.info('This message will be printed!')
  This message will be printed!
class_docstr_tok: ["Context","manager","for","logging","level",".","Parameters","--","--","--","--","--","%","(","verbose",")","s","%","(","add_frames",")","s","See","Also","--","--","--","--","mne.verbose","Notes","--","--","-","See","the",":","ref",":","`","logging","documentation","<","tut-logging",">","`","for","details",".","Examples","--","--","--","--",">",">",">","from","mne","import","use_log_level",">",">",">","from","mne.utils","import","logger",">",">",">","with","use_log_level","(","False",")",":","...","#","Most","MNE","logger","messages","are","``","info","''","level",",","False","makes","them","not","...","#","print",":","...","logger.info","(","'This","message","will","not","be","printed","'",")",">",">",">","with","use_log_level","(","True",")",":","...","#","Using","verbose=True","in","functions",",","methods",",","or","this","context","manager","...","#","will","ensure","they","are","printed","...","logger.info","(","'This","message","will","be","printed","!","'",")","This","message","will","be","printed","!"]
code: def __enter__(self):  # noqa: D105
      self._old_level = set_log_level(
          self._level,
          return_old_level=True,
          add_frames=self._add_frames,
      )
  
imports: import contextlib
  import importlib
  import inspect
  import logging
  import os.path
  import re
  import sys
  import warnings
  from io import StringIO
  from typing import Any, Callable, TypeVar
  from decorator import FunctionMaker
  from .docs import fill_doc
label_desc: Use image node_id 2 for calling the use_log_level obj's underlying member method code with example usage: obj.__enter__() without return types