Fix: Replace all Printf log messages with appropriate loglevels

This commit is contained in:
2025-12-11 11:20:11 +01:00
parent d24d85b970
commit f13be109c2
12 changed files with 32 additions and 36 deletions

View File

@@ -27,7 +27,7 @@ func RegisterLdapSyncService(ds string) {
gocron.NewTask(
func() {
t := time.Now()
cclog.Printf("ldap sync started at %s", t.Format(time.RFC3339))
cclog.Infof("ldap sync started at %s", t.Format(time.RFC3339))
if err := auth.LdapAuth.Sync(); err != nil {
cclog.Errorf("ldap sync failed: %s", err.Error())
}

View File

@@ -25,8 +25,8 @@ func RegisterUpdateDurationWorker() {
gocron.NewTask(
func() {
start := time.Now()
cclog.Printf("Update duration started at %s\n", start.Format(time.RFC3339))
cclog.Infof("Update duration started at %s", start.Format(time.RFC3339))
jobRepo.UpdateDuration()
cclog.Printf("Update duration is done and took %s\n", time.Since(start))
cclog.Infof("Update duration is done and took %s", time.Since(start))
}))
}

View File

@@ -34,7 +34,7 @@ func RegisterFootprintWorker() {
c := 0
ce := 0
cl := 0
cclog.Printf("Update Footprints started at %s\n", s.Format(time.RFC3339))
cclog.Infof("Update Footprints started at %s", s.Format(time.RFC3339))
for _, cluster := range archive.Clusters {
s_cluster := time.Now()
@@ -136,6 +136,6 @@ func RegisterFootprintWorker() {
}
cclog.Debugf("Finish Cluster %s, took %s\n", cluster.Name, time.Since(s_cluster))
}
cclog.Printf("Updating %d (of %d; Skipped %d) Footprints is done and took %s\n", c, cl, ce, time.Since(s))
cclog.Infof("Updating %d (of %d; Skipped %d) Footprints is done and took %s", c, cl, ce, time.Since(s))
}))
}