Skip to content

Commit 6fdfeb3

Browse files
committed
Polish Debug Messages
Issue gh-16484
1 parent 291162a commit 6fdfeb3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/main/java/org/springframework/security/authentication/ProviderManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,16 @@ public Authentication authenticate(Authentication authentication) throws Authent
187187
}
188188
catch (AccountStatusException ex) {
189189
prepareException(ex, authentication);
190-
logger.debug(LogMessage.format("Authentication failed for user '%s' since account status is %s",
191-
authentication.getName(), ex.getMessage()));
190+
logger.debug(LogMessage.format("Authentication failed for user '%s' since their account status is %s",
191+
authentication.getName(), ex.getMessage()), ex);
192192
// SEC-546: Avoid polling additional providers if auth failure is due to
193193
// invalid account status
194194
throw ex;
195195
}
196196
catch (InternalAuthenticationServiceException ex) {
197197
prepareException(ex, authentication);
198-
logger.debug(LogMessage.format(
199-
"Authentication failed due to an internal authentication service error: %s", ex.getMessage()));
198+
logger.debug(LogMessage.format("Authentication service failed internally for user '%s'",
199+
authentication.getName()), ex);
200200
// SEC-546: Avoid polling additional providers if auth failure is due to
201201
// invalid account status
202202
throw ex;

0 commit comments

Comments
 (0)