Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement expandable logging system #921

Open
SophieHerbst opened this issue Apr 2, 2024 · 1 comment
Open

implement expandable logging system #921

SophieHerbst opened this issue Apr 2, 2024 · 1 comment

Comments

@SophieHerbst
Copy link
Collaborator

Follow-up from #914
Aim: Provide more information from MNE's logging (currently set to 'error' by default) in the pipeline's log: implement
a logging system via rich where the user can expand and collapse entire log sections -- in a separate file?

@larsoner
Copy link
Member

larsoner commented Apr 2, 2024

In principle Python's logging system, which is used by mne, can have arbitrary handlers attached. So one way to do this would be to

  1. Set the logging level to info or whatever
  2. Remove all existing handlers
  3. Add a custom message handler that took whatever message was logged and hook it into our rich logging system

I think in principle this shouldn't be too bad to do. Could be fun for someone interested in experimenting with rich.

Maybe we could start with trying the rich-collapsible support first, and see if that's enough. Then maybe we don't need a file at all (or | tee <whatever> in the terminal could be good enough for logging mne_bids_pipeline calls).

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

No branches or pull requests

2 participants