Repository: shiro Updated Branches: refs/heads/master 78e92455a -> 1460419cc
SHIRO-462: imporving logging of exceptions Project: http://git-wip-us.apache.org/repos/asf/shiro/repo Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/e21e9863 Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/e21e9863 Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/e21e9863 Branch: refs/heads/master Commit: e21e986358b9bb62a0875c918ff1426e0ede7807 Parents: 78e9245 Author: bdemers <[email protected]> Authored: Fri Mar 25 14:41:11 2016 -0400 Committer: bdemers <[email protected]> Committed: Fri Mar 25 14:41:11 2016 -0400 ---------------------------------------------------------------------- support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java | 3 +++ .../apache/shiro/web/filter/authc/FormAuthenticationFilter.java | 3 +++ 2 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/shiro/blob/e21e9863/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java ---------------------------------------------------------------------- diff --git a/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java b/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java index 04beb26..e07e9a3 100644 --- a/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java +++ b/support/cas/src/main/java/org/apache/shiro/cas/CasFilter.java @@ -126,6 +126,9 @@ public class CasFilter extends AuthenticatingFilter { @Override protected boolean onLoginFailure(AuthenticationToken token, AuthenticationException ae, ServletRequest request, ServletResponse response) { + if (logger.isDebugEnabled()) { + logger.debug( "Authentication exception", ae ); + } // is user authenticated or in remember me mode ? Subject subject = getSubject(request, response); if (subject.isAuthenticated() || subject.isRemembered()) { http://git-wip-us.apache.org/repos/asf/shiro/blob/e21e9863/web/src/main/java/org/apache/shiro/web/filter/authc/FormAuthenticationFilter.java ---------------------------------------------------------------------- diff --git a/web/src/main/java/org/apache/shiro/web/filter/authc/FormAuthenticationFilter.java b/web/src/main/java/org/apache/shiro/web/filter/authc/FormAuthenticationFilter.java index 340842d..a6496f4 100644 --- a/web/src/main/java/org/apache/shiro/web/filter/authc/FormAuthenticationFilter.java +++ b/web/src/main/java/org/apache/shiro/web/filter/authc/FormAuthenticationFilter.java @@ -202,6 +202,9 @@ public class FormAuthenticationFilter extends AuthenticatingFilter { protected boolean onLoginFailure(AuthenticationToken token, AuthenticationException e, ServletRequest request, ServletResponse response) { + if (log.isDebugEnabled()) { + log.debug( "Authentication exception", e ); + } setFailureAttribute(request, e); //login failed, let request continue back to the login page: return true;
