Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 278d13f

Browse files
ilayaperumalgmarkpollack
authored andcommitted
Use sl4fj for logging in all the classes
- Remove commons logging and replace them with sl4fj Resolves #3108
1 parent d20f0dd commit 278d13f

File tree

12 files changed

+43
-42
lines changed

12 files changed

+43
-42
lines changed

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/batch/SimpleJobService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2013 the original author or authors.
2+
* Copyright 2009-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,8 +29,8 @@
2929

3030
import javax.batch.operations.JobOperator;
3131

32-
import org.apache.commons.logging.Log;
33-
import org.apache.commons.logging.LogFactory;
32+
import org.slf4j.Logger;
33+
import org.slf4j.LoggerFactory;
3434

3535
import org.springframework.batch.core.BatchStatus;
3636
import org.springframework.batch.core.Job;
@@ -69,7 +69,7 @@
6969
*/
7070
public class SimpleJobService implements JobService, DisposableBean {
7171

72-
private static final Log logger = LogFactory.getLog(SimpleJobService.class);
72+
private static final Logger logger = LoggerFactory.getLogger(SimpleJobService.class);
7373

7474
// 60 seconds
7575
private static final int DEFAULT_SHUTDOWN_TIMEOUT = 60 * 1000;

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/batch/SimpleJobServiceFactoryBean.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2014 the original author or authors.
2+
* Copyright 2009-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@
1919

2020
import javax.sql.DataSource;
2121

22-
import org.apache.commons.logging.Log;
23-
import org.apache.commons.logging.LogFactory;
22+
import org.slf4j.Logger;
23+
import org.slf4j.LoggerFactory;
2424

2525
import org.springframework.batch.core.configuration.JobLocator;
2626
import org.springframework.batch.core.configuration.ListableJobLocator;
@@ -57,7 +57,8 @@
5757
*
5858
*/
5959
public class SimpleJobServiceFactoryBean implements FactoryBean<JobService>, InitializingBean {
60-
private static final Log logger = LogFactory.getLog(SimpleJobServiceFactoryBean.class);
60+
61+
private static final Logger logger = LoggerFactory.getLogger(SimpleJobServiceFactoryBean.class);
6162

6263
private DataSource dataSource;
6364

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/config/DataFlowControllerAutoConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
import com.fasterxml.jackson.databind.DeserializationFeature;
2424
import com.fasterxml.jackson.databind.ObjectMapper;
25-
import org.apache.commons.logging.Log;
26-
import org.apache.commons.logging.LogFactory;
25+
import org.slf4j.Logger;
26+
import org.slf4j.LoggerFactory;
2727

2828
import org.springframework.beans.factory.ObjectProvider;
2929
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
@@ -149,7 +149,7 @@
149149
@EnableTransactionManagement
150150
public class DataFlowControllerAutoConfiguration {
151151

152-
private static Log logger = LogFactory.getLog(DataFlowControllerAutoConfiguration.class);
152+
private static final Logger logger = LoggerFactory.getLogger(DataFlowControllerAutoConfiguration.class);
153153

154154
@Bean
155155
public RootController rootController(EntityLinks entityLinks) {

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/config/DefaultEnvironmentPostProcessor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2016 the original author or authors.
2+
* Copyright 2015-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@
2121
import java.util.Properties;
2222
import java.util.Set;
2323

24-
import org.apache.commons.logging.Log;
25-
import org.apache.commons.logging.LogFactory;
24+
import org.slf4j.Logger;
25+
import org.slf4j.LoggerFactory;
2626

2727
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
2828
import org.springframework.boot.SpringApplication;
@@ -47,7 +47,7 @@
4747
*/
4848
public class DefaultEnvironmentPostProcessor implements EnvironmentPostProcessor, Ordered {
4949

50-
private static Log logger = LogFactory.getLog(DefaultEnvironmentPostProcessor.class);
50+
private static final Logger logger = LoggerFactory.getLogger(DefaultEnvironmentPostProcessor.class);
5151

5252
private final Resource serverResource = new ClassPathResource("/dataflow-server.yml");
5353

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/RuntimeAppsController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import java.util.Comparator;
2222
import java.util.List;
2323

24-
import org.apache.commons.logging.Log;
25-
import org.apache.commons.logging.LogFactory;
24+
import org.slf4j.Logger;
25+
import org.slf4j.LoggerFactory;
2626

2727
import org.springframework.cloud.dataflow.rest.resource.AppInstanceStatusResource;
2828
import org.springframework.cloud.dataflow.rest.resource.AppStatusResource;
@@ -58,7 +58,7 @@
5858
@ExposesResourceFor(AppStatusResource.class)
5959
public class RuntimeAppsController {
6060

61-
private static Log logger = LogFactory.getLog(RuntimeAppsController.class);
61+
private static final Logger logger = LoggerFactory.getLogger(RuntimeAppsController.class);
6262

6363
private static final Comparator<? super AppInstanceStatus> INSTANCE_SORTER = Comparator.comparing(i -> i.getId());
6464

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/RuntimeStreamsController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import java.util.stream.Collectors;
2424
import java.util.stream.Stream;
2525

26-
import org.apache.commons.logging.Log;
27-
import org.apache.commons.logging.LogFactory;
26+
import org.slf4j.Logger;
27+
import org.slf4j.LoggerFactory;
2828

2929
import org.springframework.cloud.dataflow.server.controller.support.StreamStatus;
3030
import org.springframework.cloud.dataflow.server.stream.StreamDeployer;
@@ -49,7 +49,7 @@ public class RuntimeStreamsController {
4949
public static final String ATTRIBUTE_SKIPPER_RELEASE_VERSION = "skipper.release.version";
5050
public static final String ATTRIBUTE_GUID = "guid";
5151

52-
private static Log logger = LogFactory.getLog(RuntimeStreamsController.class);
52+
private static final Logger logger = LoggerFactory.getLogger(RuntimeStreamsController.class);
5353

5454
private final StreamDeployer streamDeployer;
5555

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/AppDeploymentRequestCreator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017 the original author or authors.
2+
* Copyright 2017-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@
2222
import java.util.List;
2323
import java.util.Map;
2424

25-
import org.apache.commons.logging.Log;
26-
import org.apache.commons.logging.LogFactory;
25+
import org.slf4j.Logger;
26+
import org.slf4j.LoggerFactory;
2727

2828
import org.springframework.cloud.dataflow.configuration.metadata.ApplicationConfigurationMetadataResolver;
2929
import org.springframework.cloud.dataflow.core.AppRegistration;
@@ -57,7 +57,7 @@ public class AppDeploymentRequestCreator {
5757

5858
private static final String DEFAULT_PARTITION_KEY_EXPRESSION = "payload";
5959

60-
private static Log logger = LogFactory.getLog(AppDeploymentRequestCreator.class);
60+
private static final Logger logger = LoggerFactory.getLogger(AppDeploymentRequestCreator.class);
6161

6262
private final AppRegistryService appRegistry;
6363

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultStreamService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import java.util.Set;
2626
import java.util.stream.Collectors;
2727

28-
import org.apache.commons.logging.Log;
29-
import org.apache.commons.logging.LogFactory;
28+
import org.slf4j.Logger;
29+
import org.slf4j.LoggerFactory;
3030
import org.yaml.snakeyaml.DumperOptions;
3131
import org.yaml.snakeyaml.Yaml;
3232

@@ -89,7 +89,7 @@ public class DefaultStreamService implements StreamService {
8989

9090
public static final String DEFAULT_SKIPPER_PACKAGE_VERSION = "1.0.0";
9191

92-
private static Log logger = LogFactory.getLog(DefaultStreamService.class);
92+
private static final Logger logger = LoggerFactory.getLogger(DefaultStreamService.class);
9393

9494
/**
9595
* The repository this controller will use for stream CRUD operations.

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/TaskAppDeploymentRequestCreator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import java.util.stream.Collectors;
2323
import java.util.stream.Stream;
2424

25-
import org.apache.commons.logging.Log;
26-
import org.apache.commons.logging.LogFactory;
25+
import org.slf4j.Logger;
26+
import org.slf4j.LoggerFactory;
2727

2828
import org.springframework.cloud.dataflow.configuration.metadata.ApplicationConfigurationMetadataResolver;
2929
import org.springframework.cloud.dataflow.core.TaskDefinition;
@@ -45,7 +45,7 @@
4545
*/
4646
public class TaskAppDeploymentRequestCreator {
4747

48-
private static Log logger = LogFactory.getLog(TaskAppDeploymentRequestCreator.class);
48+
private static final Logger logger = LoggerFactory.getLogger(TaskAppDeploymentRequestCreator.class);
4949

5050
private final CommonApplicationProperties commonApplicationProperties;
5151

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/validation/DefaultValidationService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 the original author or authors.
2+
* Copyright 2018-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@
1818
import java.io.File;
1919
import java.io.IOException;
2020

21-
import org.apache.commons.logging.Log;
22-
import org.apache.commons.logging.LogFactory;
21+
import org.slf4j.Logger;
22+
import org.slf4j.LoggerFactory;
2323

2424
import org.springframework.boot.loader.archive.Archive;
2525
import org.springframework.boot.loader.archive.ExplodedArchive;
@@ -42,7 +42,7 @@
4242
*/
4343
public class DefaultValidationService implements ValidationService {
4444

45-
private static Log logger = LogFactory.getLog(DefaultValidationService.class);
45+
private static final Logger logger = LoggerFactory.getLogger(DefaultValidationService.class);
4646

4747
/**
4848
* The urls and credentials to required to validate access docker resources.

0 commit comments

Comments
 (0)