]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
server: Fix stuck server global error logging
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 6 Feb 2026 14:06:19 +0000 (15:06 +0100)
committerGitHub <noreply@github.com>
Fri, 6 Feb 2026 14:06:19 +0000 (15:06 +0100)
Fixes #14469

hugolib/hugo_sites.go

index ced4715cb977d1e5ed14494d416c235bc1f18cb7..2cb0b4f4295655dcaa269963131ae549791fd407 100644 (file)
@@ -42,6 +42,7 @@ import (
        "github.com/gohugoio/hugo/common/hsync"
        "github.com/gohugoio/hugo/common/htime"
        "github.com/gohugoio/hugo/common/hugo"
+       "github.com/gohugoio/hugo/common/loggers"
        "github.com/gohugoio/hugo/common/para"
        "github.com/gohugoio/hugo/common/terminal"
        "github.com/gohugoio/hugo/common/types"
@@ -526,6 +527,9 @@ func (h *HugoSites) reset() {
 // resetLogs resets the log counters etc. Used to do a new build on the same sites.
 func (h *HugoSites) resetLogs() {
        h.Log.Reset()
+       loggers.Log().Reset()
+
+       // TODO(bep) Double-check this; I'm pretty sure there is only one logger.
        for _, s := range h.Sites {
                s.Deps.Log.Reset()
        }