aboutsummaryrefslogtreecommitdiffhomepage
path: root/common
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-06-22 18:41:18 +0200
committerBjørn Erik Pedersen <[email protected]>2024-06-22 19:01:56 +0200
commit8731d8822216dd3c7587769e3cf5d98690717b0c (patch)
tree8661a711d403756c65c1a8a3bea0bdbc5aa8b12f /common
parent3b724462c24b6824c8ac4a3a9ec8dbe274809032 (diff)
downloadhugo-8731d8822216dd3c7587769e3cf5d98690717b0c.tar.gz
hugo-8731d8822216dd3c7587769e3cf5d98690717b0c.zip
Fix Erroridf/Warnidf mixed case issue
Fixes #12617
Diffstat (limited to 'common')
-rw-r--r--common/loggers/logger.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/loggers/logger.go b/common/loggers/logger.go
index f851513b3..5b49e2b17 100644
--- a/common/loggers/logger.go
+++ b/common/loggers/logger.go
@@ -323,11 +323,13 @@ func (l *logAdapter) Errors() string {
}
func (l *logAdapter) Erroridf(id, format string, v ...any) {
+ id = strings.ToLower(id)
format += l.idfInfoStatement("error", id, format)
l.errorl.WithField(FieldNameStatementID, id).Logf(format, v...)
}
func (l *logAdapter) Warnidf(id, format string, v ...any) {
+ id = strings.ToLower(id)
format += l.idfInfoStatement("warning", id, format)
l.warnl.WithField(FieldNameStatementID, id).Logf(format, v...)
}