hugolib: Include language code in REF_NOT_FOUND errors

Fixes #5110
This commit is contained in:
Bjørn Erik Pedersen 2018-08-24 09:23:01 +02:00
parent b9a503febb
commit 94d0e79d33
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -488,9 +488,9 @@ func newSiteRefLinker(cfg config.Provider, s *Site) (siteRefLinker, error) {
func (s siteRefLinker) logNotFound(ref, what string, p *Page) { func (s siteRefLinker) logNotFound(ref, what string, p *Page) {
if p != nil { if p != nil {
s.errorLogger.Printf("REF_NOT_FOUND: Ref %q: %s", ref, what) s.errorLogger.Printf("[%s] REF_NOT_FOUND: Ref %q: %s", s.s.Lang(), ref, what)
} else { } else {
s.errorLogger.Printf("REF_NOT_FOUND: Ref %q from page %q: %s", ref, p.absoluteSourceRef(), what) s.errorLogger.Printf("[%s] REF_NOT_FOUND: Ref %q from page %q: %s", s.s.Lang(), ref, p.absoluteSourceRef(), what)
} }
} }