Repository: shiro Updated Branches: refs/heads/1.2.x 88dd18050 -> c4c3c27f8
SHIRO-462: improving 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/0655e849 Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/0655e849 Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/0655e849 Branch: refs/heads/1.2.x Commit: 0655e849afc7b2414fd888c9044f6681baa3c65b Parents: 88dd180 Author: bdemers <[email protected]> Authored: Fri Mar 25 14:41:11 2016 -0400 Committer: bdemers <[email protected]> Committed: Wed Apr 13 11:06:12 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/0655e849/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/0655e849/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;
