From 664da1d436d4015181f3332e35121e9c3484bb58 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 27 Feb 2020 14:09:31 -0800 Subject: [PATCH] add more logging to cron --- trigger/cron/cron.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/trigger/cron/cron.go b/trigger/cron/cron.go index cc93837d..9a4effd5 100644 --- a/trigger/cron/cron.go +++ b/trigger/cron/cron.go @@ -79,6 +79,8 @@ func (s *Scheduler) run(ctx context.Context) error { return err } + logrus.Debugf("cron: found %d pending jobs", len(jobs)) + for _, job := range jobs { // jobs can be manually disabled in the user interface, // and should be skipped. @@ -162,6 +164,14 @@ func (s *Scheduler) run(ctx context.Context) error { Sender: commit.Author.Login, } + logger.WithFields( + logrus.Fields{ + "cron": job.Name, + "repo": repo.Slug, + "branch": repo.Branch, + "sha": commit.Sha, + }).Warnln("cron: trigger build") + _, err = s.trigger.Trigger(ctx, repo, hook) if err != nil { logger.WithFields(