diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-11-01 10:04:51 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-11-01 21:06:35 +0100 |
commit | 6180c85fb8f95e01446b74c50cab3f0480305fe4 (patch) | |
tree | 2809dd3162be8144598d87c4bcacb29f64396560 | |
parent | d3a98325c31d7f02f0762e589a4986e55b2a0da2 (diff) |
hugolib: Fix REF_NOT_FOUND logging to include page path
Fixes #5371
-rw-r--r-- | hugolib/site.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/site.go b/hugolib/site.go index 127b143e5..a4746d875 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -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) } } |