Skip to content

Commit 58d9cbd

Browse files
committed
hugolib: Improve shortcode error message
1 parent 7d39990 commit 58d9cbd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎hugolib/shortcode.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,7 @@ func renderShortcodeWithPage(tmpl tpl.Template, data *ShortcodeWithPage) string
586586
err := tmpl.Execute(buffer, data)
587587
isInnerShortcodeCache.RUnlock()
588588
if err != nil {
589-
data.Page.s.Log.ERROR.Println("error processing shortcode", tmpl.Name(), "\n ERR:", err)
590-
data.Page.s.Log.WARN.Println(data)
589+
data.Page.s.Log.ERROR.Printf("error processing shortcode %q for page %q: %s", tmpl.Name(), data.Page.Path(), err)
591590
}
592591
return buffer.String()
593592
}

0 commit comments

Comments
 (0)