shithub: hugo

Download patch

ref: 58d9cbd31bcf7c296a39860fd7e566d10faaff28
parent: 7d39990497f0ee34c252ca746850f75bab18ff5e
author: Bjørn Erik Pedersen <[email protected]>
date: Tue May 9 14:37:43 EDT 2017

hugolib: Improve shortcode error message

--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -586,8 +586,7 @@
 	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()
 }