Permalink
Browse files

Merge pull request #7 from dsklyut/master

Replace log4j with slf4j.
  • Loading branch information...
2 parents ea780b9 + a76e697 commit c3f864487a871b574c1498296a20a1838a651097 @burtbeckwith burtbeckwith committed Mar 15, 2012
@@ -14,10 +14,12 @@
*/
package org.codehaus.groovy.grails.plugins.springsecurity
-import org.apache.log4j.Logger
+
import org.codehaus.groovy.grails.commons.GrailsApplication
import org.springframework.security.web.authentication.rememberme.PersistentRememberMeToken
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
/**
* GORM-based PersistentTokenRepository implementation, based on {@link JdbcTokenRepositoryImpl}.
@@ -26,7 +28,7 @@ import org.springframework.security.web.authentication.rememberme.PersistentToke
*/
class GormPersistentTokenRepository implements PersistentTokenRepository {
- private final Logger log = Logger.getLogger(getClass())
+ private final Logger log = LoggerFactory.getLogger(getClass())
/** Dependency injection for grailsApplication */
GrailsApplication grailsApplication
@@ -14,11 +14,12 @@
*/
package org.codehaus.groovy.grails.plugins.springsecurity
-import org.apache.log4j.Logger
import org.springframework.security.core.GrantedAuthority
import org.springframework.security.core.authority.GrantedAuthorityImpl
import org.springframework.security.core.userdetails.UserDetails
import org.springframework.security.core.userdetails.UsernameNotFoundException
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
/**
* Default implementation of <code>GrailsUserDetailsService</code> that uses
@@ -28,7 +29,7 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException
*/
class GormUserDetailsService implements GrailsUserDetailsService {
- private Logger _log = Logger.getLogger(getClass())
+ private Logger _log = LoggerFactory.getLogger(getClass())
/**
* Some Spring Security classes (e.g. RoleHierarchyVoter) expect at least one role, so
@@ -24,7 +24,8 @@
import java.util.List;
import java.util.Map;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.expression.Expression;
import org.springframework.security.access.AccessDecisionVoter;
@@ -55,7 +56,7 @@
private final Map<Object, Collection<ConfigAttribute>> _compiled = new LinkedHashMap<Object, Collection<ConfigAttribute>>();
- protected final Logger _log = Logger.getLogger(getClass());
+ protected final Logger _log = LoggerFactory.getLogger(getClass());
protected static final Collection<ConfigAttribute> DENY = Collections.emptyList();
@@ -14,7 +14,8 @@
*/
package org.codehaus.groovy.grails.plugins.springsecurity;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.security.authentication.CredentialsExpiredException;
import org.springframework.security.core.SpringSecurityMessageSource;
@@ -30,7 +31,7 @@
public class DefaultPostAuthenticationChecks implements UserDetailsChecker {
protected MessageSourceAccessor messages = SpringSecurityMessageSource.getAccessor();
- protected final Logger log = Logger.getLogger(getClass());
+ protected final Logger log = LoggerFactory.getLogger(getClass());
public void check(UserDetails user) {
if (!user.isCredentialsNonExpired()) {
@@ -14,7 +14,8 @@
*/
package org.codehaus.groovy.grails.plugins.springsecurity;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.security.authentication.AccountExpiredException;
import org.springframework.security.authentication.DisabledException;
@@ -32,7 +33,7 @@
public class DefaultPreAuthenticationChecks implements UserDetailsChecker {
protected MessageSourceAccessor messages = SpringSecurityMessageSource.getAccessor();
- protected final Logger log = Logger.getLogger(getClass());
+ protected final Logger log = LoggerFactory.getLogger(getClass());
public void check(UserDetails user) {
if (!user.isAccountNonLocked()) {
@@ -27,7 +27,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.codehaus.groovy.grails.web.util.WebUtils;
import org.springframework.security.web.util.IpAddressMatcher;
import org.springframework.util.AntPathMatcher;
@@ -46,7 +47,7 @@
*/
public class IpAddressFilter extends GenericFilterBean {
- private final Logger _log = Logger.getLogger(getClass());
+ private final Logger _log = LoggerFactory.getLogger(getClass());
private final AntPathMatcher _pathMatcher = new AntPathMatcher();

0 comments on commit c3f8644

Please sign in to comment.