func (s *Site) renderForTemplate(name, outputFormat string, d interface{}, w io.Writer, templ tpl.Template) (err error) {
if templ == nil {
- s.logMissingLayout(name, "", outputFormat)
+ s.logMissingLayout(name, "", "", outputFormat)
return nil
}
}
if !found {
- s.logMissingLayout("", p.Kind(), p.f.Name)
+ s.logMissingLayout("", p.Layout(), p.Kind(), p.f.Name)
continue
}
}
}
-func (s *Site) logMissingLayout(name, kind, outputFormat string) {
+func (s *Site) logMissingLayout(name, layout, kind, outputFormat string) {
log := s.Log.WARN
if name != "" && infoOnMissingLayout[name] {
log = s.Log.INFO
args = append(args, outputFormat)
}
+ if layout != "" {
+ msg += " for layout %q"
+ args = append(args, layout)
+ }
+
if kind != "" {
msg += " for kind %q"
args = append(args, kind)