소스 검색

Polish Debug Messages

Issue gh-16484
Josh Cummings 6 달 전
부모
커밋
6fdfeb3413
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      core/src/main/java/org/springframework/security/authentication/ProviderManager.java

+ 4 - 4
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;