Log calls should be conditional:
This inspection reports that the call to a log method should be wrapped inside
an 'if
' statement that tests whether the corresponding log level is enabled for
logging or not.
Most log frameworks support querying what levels are enabled to improve the
overall application performance when logging is set to a lower level.
The improvement is achieved by skipping String concatenation and
other conversions related to the log call.
Note:Whether the inspection reports this or not, depends on the project
settings of the "Log Support" plugin and on the capabilities of the used log framework.
Powered by Log Support