Remove hard dependency on SLF4J
This PR removes the use of SLF4J from all non-test code. SLF4J is still directly referenced in the unit tests because of the mocking functionality we're using. We can explore refactoring that in a later PR. Resolves spring-cloud/spring-cloud-task#101
This commit is contained in:
@@ -24,8 +24,8 @@ import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
@@ -63,7 +63,7 @@ public class TaskLifecycleListener implements ApplicationListener<ApplicationEve
|
||||
@Autowired(required = false)
|
||||
private Collection<TaskExecutionListener> taskExecutionListeners;
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(TaskLifecycleListener.class);
|
||||
private final static Log logger = LogFactory.getLog(TaskLifecycleListener.class);
|
||||
|
||||
private final TaskRepository taskRepository;
|
||||
|
||||
|
||||
@@ -24,8 +24,9 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.aop.framework.autoproxy.AutoProxyUtils;
|
||||
import org.springframework.aop.scope.ScopedObject;
|
||||
import org.springframework.aop.scope.ScopedProxyUtils;
|
||||
@@ -41,7 +42,7 @@ import org.springframework.core.annotation.AnnotationUtils;
|
||||
*/
|
||||
public class TaskListenerExecutorFactory implements FactoryBean<TaskListenerExecutor> {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(TaskListenerExecutor.class);
|
||||
private final static Log logger = LogFactory.getLog(TaskListenerExecutor.class);
|
||||
|
||||
private final Set<Class<?>> nonAnnotatedClasses =
|
||||
Collections.newSetFromMap(new ConcurrentHashMap<Class<?>, Boolean>());
|
||||
|
||||
@@ -19,8 +19,8 @@ package org.springframework.cloud.task.repository.support;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.cloud.task.repository.TaskExecution;
|
||||
@@ -37,7 +37,7 @@ public class SimpleTaskRepository implements TaskRepository {
|
||||
public static final int MAX_EXIT_MESSAGE_SIZE = 2500;
|
||||
public static final int MAX_TASK_NAME_SIZE = 100;
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(SimpleTaskRepository.class);
|
||||
private final static Log logger = LogFactory.getLog(SimpleTaskRepository.class);
|
||||
|
||||
private TaskExecutionDao taskExecutionDao;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user