AbstractUserDetailsAuthenticationProvider
logs the following:
this.logger.debug("Failed to find user '" + username + "'")
This could be improved by not composing the message regardless of logging level. LogMessage
is a nice utility for this;
this.logger.debug(LogMessage.format("Failed to find user '%s'", username));
This makes so that the message is only concatenated if the logging level is DEBUG
or higher.
Comment From: jzheaux
Closed in favor of https://github.com/spring-projects/spring-security/issues/16496