summaryrefslogtreecommitdiff
path: root/internal/quorum/notify.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/quorum/notify.go')
-rw-r--r--internal/quorum/notify.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/internal/quorum/notify.go b/internal/quorum/notify.go
index b6e6b5d..7761b4d 100644
--- a/internal/quorum/notify.go
+++ b/internal/quorum/notify.go
@@ -17,7 +17,7 @@ func notify(conf config.Config, subject, body string) error {
return nil
}
- log.Println("notify", subject, body)
+ log.Println("notify:", subject, body)
headers := map[string]string{
"From": conf.EmailFrom,
@@ -40,11 +40,9 @@ func notify(conf config.Config, subject, body string) error {
}
func notifyError(conf config.Config, err error) {
- if !notifyEnabled(conf) {
- return
- }
-
- if err := notify(conf, fmt.Sprintf("GORUM: An error occured: %v", err), err.Error()); err != nil {
- log.Println("error: ", err)
+ if notifyEnabled(conf) {
+ if err := notify(conf, fmt.Sprintf("GORUM: An error occured: %v", err), err.Error()); err != nil {
+ log.Println("error:", err)
+ }
}
}