]> git.maquefel.me Git - brevno-suite/hugo/commit
Write all logging (INFO, WARN, ERROR) to stderr
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 13 Dec 2024 08:23:09 +0000 (09:23 +0100)
committerGitHub <noreply@github.com>
Fri, 13 Dec 2024 08:23:09 +0000 (09:23 +0100)
commit9dfa1126177952433f8339a87fb566c2959fc3d6
treead9c043d078688e5506f51d44df2474215c8b2b9
parentec1933f79d0da792d5c853cf7bf99fc9f0961162
Write all logging (INFO, WARN, ERROR) to stderr

The old setup tried to log >= warning to stderr, the rest to stdout.

However, that logic was flawed, so warnings ended up in stdout, which makes `hugo list all` etc. hard to reason about from scripts.

This commit fixes this by making all logging (info, warn, error) log to stderr and let stdout be reserved for program output.

Fixes #13074
15 files changed:
commands/commandeer.go
commands/list.go
common/loggers/handlerterminal.go
common/loggers/logger.go
common/loggers/logger_test.go
deps/deps.go
hugolib/integrationtest_builder.go
hugolib/site.go
modules/client.go
testscripts/commands/deprecate.txt
testscripts/commands/hugo__configdir.txt
testscripts/commands/hugo__path-warnings.txt
testscripts/commands/hugo_printpathwarnings.txt
testscripts/commands/hugo_printunusedtemplates.txt
testscripts/commands/warnf_stderr.txt [new file with mode: 0644]