From: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Wed, 12 Oct 2016 08:12:15 +0000 (+0200)
Subject: tpl: Remove the spamming template errors
X-Git-Tag: v0.18~201
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=eb00c621;p=brevno-suite%2Fhugo

tpl: Remove the spamming template errors

Fixes #2343
---

diff --git a/tpl/template.go b/tpl/template.go
index 431ea5a2..2039548b 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -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