Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[ASTS] Reduce log noise (#7425)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdaudali authored Nov 6, 2024
1 parent 80002f0 commit b3c5d8b
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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);
}
}

0 comments on commit b3c5d8b

Please sign in to comment.