diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java index e6ebee98268..20f97765124 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/AuthenticationService.java @@ -274,9 +274,10 @@ public class AuthenticationService extends AbstractComponent { } userListener.onResponse(user); }, (ex) -> { - logger.warn(new ParameterizedMessage( - "An unexpected error occurred while attempting to authenticate [{}] against realm [{}]", - authenticationToken.principal(), realm.name()), ex); + logger.warn( + "An error occurred while attempting to authenticate [{}] against realm [{}] - {}", + authenticationToken.principal(), realm.name(), ex); + logger.debug("Authentication failed due to exception", ex); userListener.onFailure(ex); })); } else {