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

Improvements to logging #338

Merged
merged 6 commits into from
Oct 21, 2022

Conversation

jenshnielsen
Copy link
Collaborator

  • Avoid calling getLogger on each logging call. This avoids 2 or 3 unnecessary function calls for each log call
  • Don't set the level on each individual logger to a hardcoded constant when getting the logger. This makes it hard to be able to consume the loggers since every time getLogger is called the level would be overwritten. Rather leave the level unset and rely on the level of the parent logger.
  • To enable the above ensure that the level of the "plottr" logger is set to match the level of the handler attached to it when setting up a handler (both for stream an qt widget handler)
  • Add a commandline argument to enable the user to toggle the console output level for easier debugging.

plottr/apps/inspectr.py Show resolved Hide resolved
@jenshnielsen jenshnielsen merged commit 31285a9 into toolsforexperiments:master Oct 21, 2022
@jenshnielsen jenshnielsen deleted the improve_logging branch October 21, 2022 11:26
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