diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-06-16 08:17:42 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-06-18 13:03:04 +0200 |
commit | 7c9fada778e91976d4ba1cbe942235a9bbeaf5cb (patch) | |
tree | a717f6e0a5915777ae6859564acd13385213bbab /hugolib/hugo_sites.go | |
parent | 0e7944658660b5658b7640dce3cb346d7198d8c9 (diff) | |
download | hugo-7c9fada778e91976d4ba1cbe942235a9bbeaf5cb.tar.gz hugo-7c9fada778e91976d4ba1cbe942235a9bbeaf5cb.zip |
Replace the old log setup, with structured logging etc.
Fixes #11124
Diffstat (limited to 'hugolib/hugo_sites.go')
-rw-r--r-- | hugolib/hugo_sites.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index 290eebe82..6ffef6fa8 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -23,6 +23,7 @@ import ( "sync" "sync/atomic" + "github.com/bep/logg" "github.com/gohugoio/hugo/config/allconfig" "github.com/gohugoio/hugo/hugofs/glob" @@ -42,7 +43,6 @@ import ( "github.com/gohugoio/hugo/source" "github.com/gohugoio/hugo/common/herrors" - "github.com/gohugoio/hugo/common/loggers" "github.com/gohugoio/hugo/deps" "github.com/gohugoio/hugo/helpers" "github.com/gohugoio/hugo/lazy" @@ -265,7 +265,7 @@ func (h *HugoSites) NumLogErrors() int { if h == nil { return 0 } - return int(h.Log.LogCounters().ErrorCounter.Count()) + return h.Log.LoggCount(logg.LevelError) } func (h *HugoSites) PrintProcessingStats(w io.Writer) { @@ -352,10 +352,8 @@ func (h *HugoSites) reset(config *BuildCfg) { // resetLogs resets the log counters etc. Used to do a new build on the same sites. func (h *HugoSites) resetLogs() { h.Log.Reset() - loggers.GlobalErrorCounter.Reset() for _, s := range h.Sites { s.Deps.Log.Reset() - s.Deps.LogDistinct.Reset() } } |