Switch from Log4j to SLF4J.

Resolves gh-18.
This commit is contained in:
John Blum
2018-12-17 21:05:25 -08:00
parent 3682304242
commit 5fdc7837b3
2 changed files with 12 additions and 12 deletions

View File

@@ -70,8 +70,8 @@ import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* {@link AbstractGemFireOperationsSessionRepository} is an abstract base class encapsulating functionality
@@ -115,7 +115,7 @@ public abstract class AbstractGemFireOperationsSessionRepository extends CacheLi
private final GemfireOperations template;
private final Log logger = newLogger();
private final Logger logger = newLogger();
private final Set<Integer> cachedSessionIds = new ConcurrentSkipListSet<>();
@@ -138,14 +138,14 @@ public abstract class AbstractGemFireOperationsSessionRepository extends CacheLi
}
/**
* Constructs a new instance of {@link Log} using Apache Commons {@link LogFactory}.
* Constructs a new instance of {@link Logger} using Apache Commons {@link LoggerFactory}.
*
* @return a new instance of {@link Log} constructed from Apache commons-logging {@link LogFactory}.
* @return a new instance of {@link Logger} constructed from Apache commons-logging {@link LoggerFactory}.
* @see org.apache.commons.logging.LogFactory#getLog(Class)
* @see org.apache.commons.logging.Log
*/
private Log newLogger() {
return LogFactory.getLog(getClass());
private Logger newLogger() {
return LoggerFactory.getLogger(getClass());
}
/**
@@ -187,12 +187,12 @@ public abstract class AbstractGemFireOperationsSessionRepository extends CacheLi
}
/**
* Return a reference to the {@link Log} used to log messages.
* Return a reference to the {@link Logger} used to log messages.
*
* @return a reference to the {@link Log} used to log messages.
* @return a reference to the {@link Logger} used to log messages.
* @see org.apache.commons.logging.Log
*/
protected Log getLogger() {
protected Logger getLogger() {
return this.logger;
}

View File

@@ -89,7 +89,7 @@ import org.springframework.session.events.SessionDeletedEvent;
import org.springframework.session.events.SessionDestroyedEvent;
import org.springframework.session.events.SessionExpiredEvent;
import org.apache.commons.logging.Log;
import org.slf4j.Logger;
/**
* Unit tests for {@link AbstractGemFireOperationsSessionRepository}.
@@ -118,7 +118,7 @@ public class AbstractGemFireOperationsSessionRepositoryTests {
private AbstractGemFireOperationsSessionRepository sessionRepository;
@Mock
private Log mockLog;
private Logger mockLog;
@Mock
private Region<Object, Session> mockRegion;