diff options
author | micdzied <michal.1.dziedzic@nokia.com> | 2018-08-30 10:25:19 +0200 |
---|---|---|
committer | micdzied <michal.1.dziedzic@nokia.com> | 2018-08-30 14:53:20 +0200 |
commit | 6fd8c7770fbea30ad2ec6e3f7645b8baab5a49a1 (patch) | |
tree | 78d572b5df8c88047d74edf3c75b28fcab3d0dc6 /prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java | |
parent | 82a6fc31d1905f380fbbae1d0b4a34b67d8258e3 (diff) |
add MDC's
Change-Id: Ie4fe86791f46b790ae42088a5d2b93f491e4549d
Issue-ID: DCAEGEN2-730
Signed-off-by: micdzied <michal.1.dziedzic@nokia.com>
Diffstat (limited to 'prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java')
-rw-r--r-- | prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java index a27feefb..6132a674 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/configuration/SchedulerConfig.java @@ -28,6 +28,10 @@ import java.util.List; import java.util.concurrent.ScheduledFuture; import javax.annotation.PostConstruct; import org.onap.dcaegen2.services.prh.tasks.ScheduledTasks; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Configuration; @@ -49,6 +53,8 @@ public class SchedulerConfig { private static final int SCHEDULING_DELAY_FOR_PRH_TASKS = 5; private static final int SCHEDULING_REQUEST_FOR_CONFIGURATION_DELAY = 5; private static volatile List<ScheduledFuture> scheduledPrhTaskFutureList = new ArrayList<>(); + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + private final Marker ENTRY = MarkerFactory.getMarker("ENRTY"); private final ConcurrentTaskScheduler taskScheduler; private final ScheduledTasks scheduledTask; @@ -88,6 +94,7 @@ public class SchedulerConfig { @PostConstruct @ApiOperation(value = "Start task if possible") public synchronized boolean tryToStartTask() { + logger.info(ENTRY,"Start scheduling PRH workflow"); if (scheduledPrhTaskFutureList.isEmpty()) { scheduledPrhTaskFutureList.add(cloudTaskScheduler .scheduleAtFixedRate(cloudConfiguration::runTask, Instant.now(), |