From fac26dfc721e51cce7a49e6e32e3bd07ba91d07a Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Fri, 27 Dec 2019 12:05:56 +0100 Subject: [PATCH] fix: improve logging --- pkg/notifications/notifier.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/notifications/notifier.go b/pkg/notifications/notifier.go index 2f25824..20e8337 100644 --- a/pkg/notifications/notifier.go +++ b/pkg/notifications/notifier.go @@ -27,8 +27,10 @@ func NewNotifier(c *cobra.Command) *Notifier { acceptedLogLevels := slackrus.LevelThreshold(logLevel) // Parse types and create notifiers. - types, _ := f.GetStringSlice("notifications") - + types, err := f.GetStringSlice("notifications") + if err != nil { + log.WithField("could not read notifications argument", log.Fields{ "Error": err }).Fatal() + } for _, t := range types { var tn ty.Notifier switch t {