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
Since the log methods which take no arguments short-cut all the format logic and varargs array creation etc - e.g. see org.slf4j.helpers.MessageFormatter#arrayFormat(java.lang.String, java.lang.Object[], java.lang.Throwable)
Note in particular that with this single argument call slf4j does not parse the passed string for {} placeholders
Hence replacing with this has non-trivial performance impact
logger.info("{}", computeToString(var))
Hence it would be useful if (2) could either be captured by a different check, or permitted
The text was updated successfully, but these errors were encountered:
This is bad and deserves to be raised as error:
logger.info("blah: " + var);
However, this is sometime tolerable:
logger.info(computeToString(var))
Since the log methods which take no arguments short-cut all the format logic and varargs array creation etc - e.g. see
org.slf4j.helpers.MessageFormatter#arrayFormat(java.lang.String, java.lang.Object[], java.lang.Throwable)
Note in particular that with this single argument call slf4j does not parse the passed string for
{}
placeholdersHence replacing with this has non-trivial performance impact
logger.info("{}", computeToString(var))
Hence it would be useful if (2) could either be captured by a different check, or permitted
The text was updated successfully, but these errors were encountered: