From e5ebd41c1392d321d6a9c4d414bea6ace3b42569 Mon Sep 17 00:00:00 2001 From: Michael Kaye <1917473+michaelkaye@users.noreply.github.com> Date: Mon, 26 Nov 2018 11:41:11 +0000 Subject: [PATCH] Add logging for alertmanager template failures --- .../matrix-org/go-neb/services/alertmanager/alertmanager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/github.com/matrix-org/go-neb/services/alertmanager/alertmanager.go b/src/github.com/matrix-org/go-neb/services/alertmanager/alertmanager.go index 1207772..bed46fd 100644 --- a/src/github.com/matrix-org/go-neb/services/alertmanager/alertmanager.go +++ b/src/github.com/matrix-org/go-neb/services/alertmanager/alertmanager.go @@ -130,6 +130,7 @@ func (s *Service) Register(oldService types.Service, client *gomatrix.Client) er // validate the plain text template is valid _, err := text.New("textTemplate").Parse(templates.TextTemplate) if err != nil { + log.WithError(err).Print("plain text template error") return fmt.Errorf("plain text template is invalid") } @@ -137,6 +138,7 @@ func (s *Service) Register(oldService types.Service, client *gomatrix.Client) er // validate that the html template is valid _, err := html.New("htmlTemplate").Parse(templates.HTMLTemplate) if err != nil { + log.WithError(err).Print("html template error") return fmt.Errorf("html template is invalid") } }