From f6c19896a2c57dcb5e4273b839a98908b00888a7 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 8 Aug 2020 18:40:23 +0200 Subject: [PATCH] lifecycle logs as Debug instead of Info (#610) The life-cycle messages should not have the same level as the update messages. Why? I receive a (mail-) notification for every run even if no image is changed: ``` 2020-07-31 06:44:33 (info): Executing pre-check command. ``` But I only want to receive a notification if something changed: ``` 2020-07-20 06:44:44 (info): Found new traefik:v2.2 image (sha256:7c992081f52423e325bd12debf0edcb4f7cfa398683c26f99c00112ec14e1ab9) ``` --- pkg/lifecycle/lifecycle.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/lifecycle/lifecycle.go b/pkg/lifecycle/lifecycle.go index 2d2d50c..df639d7 100644 --- a/pkg/lifecycle/lifecycle.go +++ b/pkg/lifecycle/lifecycle.go @@ -36,7 +36,7 @@ func ExecutePreCheckCommand(client container.Client, container container.Contain return } - log.Info("Executing pre-check command.") + log.Debug("Executing pre-check command.") if err := client.ExecuteCommand(container.ID(), command, 1); err != nil { log.Error(err) } @@ -50,7 +50,7 @@ func ExecutePostCheckCommand(client container.Client, container container.Contai return } - log.Info("Executing post-check command.") + log.Debug("Executing post-check command.") if err := client.ExecuteCommand(container.ID(), command, 1); err != nil { log.Error(err) } @@ -65,7 +65,7 @@ func ExecutePreUpdateCommand(client container.Client, container container.Contai return nil } - log.Info("Executing pre-update command.") + log.Debug("Executing pre-update command.") return client.ExecuteCommand(container.ID(), command, timeout) } @@ -83,7 +83,7 @@ func ExecutePostUpdateCommand(client container.Client, newContainerID string) { return } - log.Info("Executing post-update command.") + log.Debug("Executing post-update command.") if err := client.ExecuteCommand(newContainerID, command, 1); err != nil { log.Error(err) }