Skip to content

BUG: Fix bug with logging level#13843

Merged
drammock merged 8 commits intomne-tools:mainfrom
larsoner:bug
Apr 15, 2026
Merged

BUG: Fix bug with logging level#13843
drammock merged 8 commits intomne-tools:mainfrom
larsoner:bug

Conversation

@larsoner
Copy link
Copy Markdown
Member

@larsoner larsoner commented Apr 15, 2026

In MNE-BIDS-Pipeline in the find_bads_maxwell step I was getting a ton of messages about windowing even though verbose=False was being used.

I tracked it down to a weird case where _verbose_safe_false() returned None because logger.level was already high enough not to log... but use_log_level(None) did not mean "don't modify the logger level", it meant "read the sys config and use the default" 🤦 use_log_level is used internally by the verbose decorator, so making it be a no-op when verbose is None makes the most sense here. It also fixes the behavior of set_log_level, which previously probably didn't do what we wanted it to.

With this PR, we should have a lot fewer accesses to the .mne/mne-python.json file as well, which is nice I think (similar to #13777).

@drammock drammock enabled auto-merge (squash) April 15, 2026 16:04
@drammock drammock merged commit a8fdad7 into mne-tools:main Apr 15, 2026
32 checks passed
@drammock drammock deleted the bug branch April 15, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants