Fix the deprecation error/warn log levels
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 15 Jul 2021 10:24:20 +0000 (12:24 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 15 Jul 2021 10:24:20 +0000 (12:24 +0200)
helpers/general.go

index 09bf311f94bfc60da9069bb9b40c803c0c80ff79..c5af83b663b09e307cc1bc7edd09441ffa33bf3c 100644 (file)
@@ -394,9 +394,9 @@ func InitLoggers() {
 // plenty of time to fix their templates.
 func Deprecated(item, alternative string, err bool) {
        if err {
-               DistinctErrorLog.Printf("%s is deprecated and will be removed in Hugo %s. %s", item, hugo.CurrentVersion.Next().ReleaseVersion(), alternative)
+               DistinctErrorLog.Errorf("%s is deprecated and will be removed in Hugo %s. %s", item, hugo.CurrentVersion.Next().ReleaseVersion(), alternative)
        } else {
-               DistinctWarnLog.Printf("%s is deprecated and will be removed in a future release. %s", item, alternative)
+               DistinctWarnLog.Warnf("%s is deprecated and will be removed in a future release. %s", item, alternative)
        }
 }