Log every execution of the SGScript entries at TRACE level in the cluster-controller and the schedule of the cron entries at INFO level

Summary

The cluster-controller only logs the first execution of an SGScript entry with cron, and the following executions are invisible unless they fail (the status of the SGCluster is only updated on failure, on recovery or on a setValue change). Answering "is the scheduled script running" requires reading the database.

Proposed solution

  • Log at TRACE level every execution of an SGScript entry (scheduled or not), with its outcome and duration.
  • Log at INFO level the first execution of an SGScript entry with cron since the start of the cluster-controller container, including the cron expression.
  • Log that INFO line again when the cron expression or the script of the entry change.
Edited by Matteo Melli