From 6fdfeb3413391208ece6cc3044aeb9ebd7858f7a Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Fri, 14 Feb 2025 16:05:42 -0700 Subject: [PATCH] Polish Debug Messages Issue gh-16484 --- .../security/authentication/ProviderManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/springframework/security/authentication/ProviderManager.java b/core/src/main/java/org/springframework/security/authentication/ProviderManager.java index 303444cc6b..479f99f704 100644 --- a/core/src/main/java/org/springframework/security/authentication/ProviderManager.java +++ b/core/src/main/java/org/springframework/security/authentication/ProviderManager.java @@ -187,16 +187,16 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar } catch (AccountStatusException ex) { prepareException(ex, authentication); - logger.debug(LogMessage.format("Authentication failed for user '%s' since account status is %s", - authentication.getName(), ex.getMessage())); + logger.debug(LogMessage.format("Authentication failed for user '%s' since their account status is %s", + authentication.getName(), ex.getMessage()), ex); // SEC-546: Avoid polling additional providers if auth failure is due to // invalid account status throw ex; } catch (InternalAuthenticationServiceException ex) { prepareException(ex, authentication); - logger.debug(LogMessage.format( - "Authentication failed due to an internal authentication service error: %s", ex.getMessage())); + logger.debug(LogMessage.format("Authentication service failed internally for user '%s'", + authentication.getName()), ex); // SEC-546: Avoid polling additional providers if auth failure is due to // invalid account status throw ex;