summaryrefslogtreecommitdiff
path: root/notifications.go
diff options
context:
space:
mode:
authorJan Dittberner <jan@dittberner.info>2017-04-22 00:06:16 +0200
committerJan Dittberner <jan@dittberner.info>2017-04-22 00:14:38 +0200
commit5a449926f417f75acff415d1a359571d86be0983 (patch)
tree0457a5ab88841156e379c977442a6e87e64e3419 /notifications.go
parentfd0a8ed972f6b9327d118292b46ab5c601a48ac3 (diff)
downloadcacert-boardvoting-5a449926f417f75acff415d1a359571d86be0983.tar.gz
cacert-boardvoting-5a449926f417f75acff415d1a359571d86be0983.tar.xz
cacert-boardvoting-5a449926f417f75acff415d1a359571d86be0983.zip
Use loggo for logging0.1.0
Diffstat (limited to 'notifications.go')
-rw-r--r--notifications.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/notifications.go b/notifications.go
index aa8c7a8..5061a2a 100644
--- a/notifications.go
+++ b/notifications.go
@@ -34,14 +34,14 @@ type NotificationMail interface {
var NotifyMailChannel = make(chan NotificationMail, 1)
func MailNotifier(quitMailNotifier chan int) {
- logger.Println("Launched mail notifier")
+ logger.Infof("Launched mail notifier")
for {
select {
case notification := <-NotifyMailChannel:
content := notification.GetNotificationContent()
mailText, err := buildMail(content.template, content.data)
if err != nil {
- logger.Println("ERROR building mail:", err)
+ logger.Errorf("building mail failed: %s", err)
continue
}
@@ -58,10 +58,10 @@ func MailNotifier(quitMailNotifier chan int) {
d := gomail.NewDialer(config.MailServer.Host, config.MailServer.Port, "", "")
if err := d.DialAndSend(m); err != nil {
- logger.Println("ERROR sending mail:", err)
+ logger.Errorf("sending mail failed: %s", err)
}
case <-quitMailNotifier:
- fmt.Println("Ending mail notifier")
+ logger.Infof("Ending mail notifier")
return
}
}