You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by lh...@apache.org on 2010/04/23 23:15:34 UTC
svn commit: r937523 -
/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/authc/pam/ModularRealmAuthenticator.java
Author: lhazlewood
Date: Fri Apr 23 21:15:33 2010
New Revision: 937523
URL: http://svn.apache.org/viewvc?rev=937523&view=rev
Log:
SHIRO-143: Changed logging level to trace and debug.
Modified:
incubator/shiro/trunk/core/src/main/java/org/apache/shiro/authc/pam/ModularRealmAuthenticator.java
Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/authc/pam/ModularRealmAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/authc/pam/ModularRealmAuthenticator.java?rev=937523&r1=937522&r2=937523&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/authc/pam/ModularRealmAuthenticator.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/authc/pam/ModularRealmAuthenticator.java Fri Apr 23 21:15:33 2010
@@ -88,6 +88,7 @@ public class ModularRealmAuthenticator e
/*--------------------------------------------
| C O N S T R U C T O R S |
============================================*/
+
/**
* Default no-argument constructor which
* {@link #setAuthenticationStrategy(AuthenticationStrategy) enables} an
@@ -125,6 +126,7 @@ public class ModularRealmAuthenticator e
/*--------------------------------------------
| A C C E S S O R S / M O D I F I E R S |
============================================*/
+
/**
* Convenience setter for single-realm environments (fairly common). This method just wraps the realm in a
* collection and then calls {@link #setRealms}.
@@ -184,6 +186,7 @@ public class ModularRealmAuthenticator e
/*--------------------------------------------
| M E T H O D S |
============================================*/
+
/**
* Used by the internal {@link #doAuthenticate} implementation to ensure that the {@code realms} property
* has been set. The default implementation ensures the property is not null and not empty.
@@ -238,15 +241,15 @@ public class ModularRealmAuthenticator e
AuthenticationInfo aggregate = strategy.beforeAllAttempts(realms, token);
- if (log.isDebugEnabled()) {
- log.debug("Iterating through {} realms for PAM authentication", realms.size());
+ if (log.isTraceEnabled()) {
+ log.trace("Iterating through {} realms for PAM authentication", realms.size());
}
for (Realm realm : realms) {
if (realm.supports(token)) {
- log.debug("Attempting to authenticate token [{}] using realm [{}]", token, realm);
+ log.trace("Attempting to authenticate token [{}] using realm [{}]", token, realm);
AuthenticationInfo info = null;
Throwable t = null;
@@ -254,9 +257,9 @@ public class ModularRealmAuthenticator e
info = realm.getAuthenticationInfo(token);
} catch (Throwable throwable) {
t = throwable;
- if (log.isTraceEnabled()) {
+ if (log.isDebugEnabled()) {
String msg = "Realm [" + realm + "] threw an exception during a multi-realm authentication attempt:";
- log.trace(msg, t);
+ log.debug(msg, t);
}
}