-
Notifications
You must be signed in to change notification settings - Fork 427
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
Simplify logging calls #2663
Labels
Comments
MattHag
added a commit
to MattHag/Solaar
that referenced
this issue
Nov 6, 2024
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
added a commit
to MattHag/Solaar
that referenced
this issue
Nov 6, 2024
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
This also relates to #2273 |
MattHag
added a commit
to MattHag/Solaar
that referenced
this issue
Jan 1, 2025
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
added a commit
to MattHag/Solaar
that referenced
this issue
Jan 2, 2025
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
pfps
pushed a commit
that referenced
this issue
Jan 2, 2025
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 #2663
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code uses mainly if-enabled-then-log constructs. Only few places don't use the check beforehand.
Current state
This code piece is used over 100 times:
Goal
Simplify logging while retaining the functionality with a custom logger that implicitly runs the checks. Logging should get as simple as
The text was updated successfully, but these errors were encountered: