diff --git a/atlasdb-impl-shared/src/main/java/com/palantir/atlasdb/sweep/asts/DynamicTaskScheduler.java b/atlasdb-impl-shared/src/main/java/com/palantir/atlasdb/sweep/asts/DynamicTaskScheduler.java index 7f2fa2c5fd..93c342cdb2 100644 --- a/atlasdb-impl-shared/src/main/java/com/palantir/atlasdb/sweep/asts/DynamicTaskScheduler.java +++ b/atlasdb-impl-shared/src/main/java/com/palantir/atlasdb/sweep/asts/DynamicTaskScheduler.java @@ -88,7 +88,9 @@ public void start() { private void runOneIteration() { Duration delay = automaticSweepRefreshDelay.get(); try { - log.info("Running task: {}", SafeArg.of("task", safeLoggableTaskName)); + if (log.isDebugEnabled()) { + log.debug("Running task: {}", SafeArg.of("task", safeLoggableTaskName)); + } task.run(); } catch (Exception e) { log.warn( @@ -101,10 +103,12 @@ private void runOneIteration() { } private void scheduleNextIteration(Duration delay) { - log.info( - "Scheduling next iteration for {} with delay {}", - SafeArg.of("task", safeLoggableTaskName), - SafeArg.of("delay", delay)); + if (log.isDebugEnabled()) { + log.debug( + "Scheduling next iteration for {} with delay {}", + SafeArg.of("task", safeLoggableTaskName), + SafeArg.of("delay", delay)); + } scheduledExecutorService.schedule(this::runOneIteration, delay.toMillis(), TimeUnit.MILLISECONDS); } }