Mercurial > gemma
diff pkg/scheduler/scheduler.go @ 5490:5f47eeea988d logging
Use own logging package.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 20 Sep 2021 17:45:39 +0200 |
parents | 5826d4de0e40 |
children |
line wrap: on
line diff
--- a/pkg/scheduler/scheduler.go Sat Aug 21 15:01:52 2021 +0200 +++ b/pkg/scheduler/scheduler.go Mon Sep 20 17:45:39 2021 +0200 @@ -14,12 +14,13 @@ package scheduler import ( - "log" "sort" "strings" "sync" cron "gopkg.in/robfig/cron.v1" + + "gemma.intevation.de/gemma/pkg/log" ) // Action is called with a configuration id. @@ -42,7 +43,7 @@ if a := ua.scheduler.action(ua.name); a != nil { a(ua.cfgID) } else { - log.Printf("warn: scheduled action '%s' not found.", ua.name) + log.Warnf("scheduled action '%s' not found.", ua.name) } } @@ -104,7 +105,7 @@ numJobs++ } - log.Printf("info: booting %d scheduler jobs from database.\n", numJobs) + log.Infof("booting %d scheduler jobs from database.\n", numJobs) s.mu.Lock() defer s.mu.Unlock() @@ -299,7 +300,7 @@ func LogActionNames() { names := global.actionNames() sort.Strings(names) - log.Printf("info: actions registered to scheduler: %s\n", + log.Infof("actions registered to scheduler: %s\n", strings.Join(names, ", ")) }