tpl: Remove the spamming template errors
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 12 Oct 2016 08:12:15 +0000 (10:12 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 12 Oct 2016 08:12:15 +0000 (10:12 +0200)
Fixes #2343

tpl/template.go

index 431ea5a24b3384d3bb3682763cd362217161ccb2..2039548bf6bc78820f0962eaa9a98bba37ba4a8e 100644 (file)
@@ -127,7 +127,8 @@ func executeTemplate(context interface{}, w io.Writer, layouts ...string) {
 
                if templ != nil {
                        if err := templ.Execute(w, context); err != nil {
-                               jww.ERROR.Println(err, "in", layout)
+                               // Printing the err is spammy, see https://github.com/golang/go/issues/17414
+                               helpers.DistinctErrorLog.Println(layout, "is an incomplete or empty template")
                        }
                        worked = true
                        break