From: Bjørn Erik Pedersen Date: Tue, 9 May 2017 16:37:43 +0000 (+0200) Subject: hugolib: Improve shortcode error message X-Git-Tag: v0.21~40 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=58d9cbd3;p=brevno-suite%2Fhugo hugolib: Improve shortcode error message --- diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index 01beffe2..b088ed61 100644 --- a/hugolib/shortcode.go +++ b/hugolib/shortcode.go @@ -586,8 +586,7 @@ func renderShortcodeWithPage(tmpl tpl.Template, data *ShortcodeWithPage) string err := tmpl.Execute(buffer, data) isInnerShortcodeCache.RUnlock() if err != nil { - data.Page.s.Log.ERROR.Println("error processing shortcode", tmpl.Name(), "\n ERR:", err) - data.Page.s.Log.WARN.Println(data) + data.Page.s.Log.ERROR.Printf("error processing shortcode %q for page %q: %s", tmpl.Name(), data.Page.Path(), err) } return buffer.String() }