You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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: