Permalink
Browse files

hugolib: Fix REF_NOT_FOUND logging to include page path

Fixes #5371
  • Loading branch information...
bep committed Nov 1, 2018
1 parent d3a9832 commit 6180c85fb8f95e01446b74c50cab3f0480305fe4
Showing with 2 additions and 2 deletions.
  1. +2 −2 hugolib/site.go
View
@@ -494,10 +494,10 @@ func newSiteRefLinker(cfg config.Provider, s *Site) (siteRefLinker, error) {
}
func (s siteRefLinker) logNotFound(ref, what string, p *Page) {
if p != nil {
if p == nil {
s.errorLogger.Printf("[%s] REF_NOT_FOUND: Ref %q: %s", s.s.Lang(), ref, what)
} else {
s.errorLogger.Printf("[%s] REF_NOT_FOUND: Ref %q from page %q: %s", s.s.Lang(), ref, p.absoluteSourceRef(), what)
s.errorLogger.Printf("[%s] REF_NOT_FOUND: Ref %q from page %q: %s", s.s.Lang(), ref, p.pathOrTitle(), what)
}
}

0 comments on commit 6180c85

Please sign in to comment.