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

Update log level #288

Merged
merged 3 commits into from
Aug 3, 2023
Merged

Update log level #288

merged 3 commits into from
Aug 3, 2023

Conversation

tab-cmd
Copy link
Contributor

@tab-cmd tab-cmd commented Aug 2, 2023

Overview

Update the default log level and the main client to INFO. Update useful logs used during experiments to info.

Ticket

Link a pivotal ticket here

Contributions

  • main: update to default info
  • system_utils: update to default info
  • Update acquisition, task, and helper logs to use INFO.

Test

  • make test-all
  • Ran a BciPy calibration and ensured the matplotlib DEBUG logs were no longer present

Documentation

  • Are documentation updates required? In-line, README, or documentation? N/A

Changelog

  • Is the CHANGELOG.md updated with your detailed changes? Yes!

@tab-cmd tab-cmd requested review from lawhead and celikbasak August 2, 2023 17:05
Copy link
Collaborator

@lawhead lawhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this approach makes sense and that the logging level for most of these statements should actually be INFO. Another approach that I recently discovered is to get the logger specifically for matplotlib and change its level. So in the system_utils.py configure_logger function, you could use:

# Special case for matplotlib
lib_logger = logging.getLogger('matplotlib')
lib_logger.setLevel(logging.ERROR)

@tab-cmd
Copy link
Contributor Author

tab-cmd commented Aug 2, 2023

I think this approach makes sense and that the logging level for most of these statements should actually be INFO. Another approach that I recently discovered is to get the logger specifically for matplotlib and change its level. So in the system_utils.py configure_logger function, you could use:

# Special case for matplotlib
lib_logger = logging.getLogger('matplotlib')
lib_logger.setLevel(logging.ERROR)

We do that with PIL, and I'd be willing to add matplotlib. I'll leave it at INFO to address this issue, and we can revisit it if more issues arise.

@tab-cmd tab-cmd merged commit 4493483 into 2.0.0rc4 Aug 3, 2023
@tab-cmd tab-cmd deleted the log_level_update branch May 30, 2024 18:51
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.

3 participants