mne.use_log_level#
- class mne.use_log_level(verbose=None, *, add_frames=None)[source]#
Context manager for logging level.
- Parameters:
- verbose
bool
|str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.- add_frames
int
|None
If int, enable (>=1) or disable (0) the printing of stack frame information using formatting. Default (None) does not change the formatting. This can add overhead so is meant only for debugging.
- verbose
See also
Notes
See the logging documentation 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!
Examples using mne.use_log_level
#
Configuring MNE-Python
The Spectrum and EpochsSpectrum classes: frequency-domain data
The Spectrum and EpochsSpectrum classes: frequency-domain data