Using String.format in log messages when using slf4j is discouraged because the string interpolation is performed even if the log is disabled.We have to rewrite them For example, statement like
{code:java} logger.debug(String.format("Push Message Request from [%s] API was internally submitted for further processing", message.getClientIdentifier())); {code}
will become
{code:java} logger.debug("Push Message Request from {} API was internally submitted for further processing", message.getClientIdentifier()); {code} |
|