Fix the deprecation error/warn log levels

This commit is contained in:
Bjørn Erik Pedersen 2021-07-15 12:24:20 +02:00
parent 805664818d
commit a70da2b74a
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
1 changed files with 2 additions and 2 deletions

View 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)
}
}