Skip to content

Commit 7043748

Browse files
committed
[core] Suppress periodic output unless veryVerbose=true
1 parent ee07c38 commit 7043748

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

core/scheduler.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,13 +787,13 @@ func resourceOffers(state *internalState, fidStore store.Singleton) events.Handl
787787
if viper.GetBool("summaryMetrics") {
788788
state.metricsAPI.launchesPerOfferCycle(float64(tasksLaunchedThisCycle))
789789
}
790-
var msg string
791790
if tasksLaunchedThisCycle == 0 {
792-
msg = "offers cycle complete, no tasks launched"
791+
if viper.GetBool("veryVerbose") {
792+
log.WithPrefix("scheduler").Debug("offers cycle complete, no tasks launched")
793+
}
793794
} else {
794-
msg = "offers cycle complete, tasks launched"
795+
log.WithPrefix("scheduler").WithField("tasks", tasksLaunchedThisCycle).Debug("offers cycle complete, tasks launched")
795796
}
796-
log.WithPrefix("scheduler").WithField("tasks", tasksLaunchedThisCycle).Debug(msg)
797797
return nil
798798
}
799799
}

0 commit comments

Comments
 (0)