From c19479757a20d72484b4e071b45055746ff2b67e Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 1 Sep 2022 14:19:00 +0200 Subject: [PATCH] fix: properly log extra message --- pkg/mail/mail.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/mail/mail.go b/pkg/mail/mail.go index 98ae70af..2511ce23 100644 --- a/pkg/mail/mail.go +++ b/pkg/mail/mail.go @@ -105,14 +105,14 @@ func StartMailDaemon() { if !open { err = c.DialWithContext(context.Background()) if err != nil { - log.Error("Error during connect to smtp server: %s", err) + log.Errorf("Error during connect to smtp server: %s", err) break } open = true } err = c.Send(m) if err != nil { - log.Error("Error when sending mail: %s", err) + log.Errorf("Error when sending mail: %s", err) break } // Close the connection to the SMTP server if no email was sent in @@ -122,10 +122,10 @@ func StartMailDaemon() { open = false err = c.Close() if err != nil { - log.Error("Error closing the mail server connection: %s\n", err) + log.Errorf("Error closing the mail server connection: %s\n", err) break } - log.Infof("Closed connection to mail server") + log.Info("Closed connection to mail server") } } }