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

Custom logger #2664

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Custom logger #2664

wants to merge 1 commit into from

Conversation

MattHag
Copy link
Collaborator

@MattHag MattHag commented Nov 6, 2024

No description provided.

Implement logger that internally checks if log level is enabled. Thus,
unnecessary log message computation costs are avoid, when logging is
disabled and logging code can be cut in half.

Related pwr-Solaar#2663
@MattHag
Copy link
Collaborator Author

MattHag commented Nov 6, 2024

@pfps
If the custom logger is fine, we can remove hundreds of code lines.

@pfps
Copy link
Collaborator

pfps commented Nov 6, 2024

Yes, good idea. There is currently some weirdness going on with logging that I have seen occasionally. Some logging messages appear to be generated using some sort of default settings. I expect that this is another effect of how Python does module initialization. With any luck the changes here might be able to fix this weirdness.

@MattHag MattHag marked this pull request as draft November 6, 2024 20:26
@MattHag
Copy link
Collaborator Author

MattHag commented Nov 6, 2024

Great, then I just wait for the open changes to be merged and then I'll remove several hundred code lines.

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