mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Revise the deprecation logging
This introduces a more automatic way of increasing the log levels for deprecation log statements based on the version it was deprecated. The thresholds are a little arbitrary, but * We log INFO for 6 releases * We log WARN for another 6 releases * THen ERROR (failing the build) This should give theme authors plenty of time to catch up without having the log filled with warnings.
This commit is contained in:
@@ -28,10 +28,10 @@ import (
|
||||
"errors"
|
||||
|
||||
"github.com/gohugoio/hugo/common/collections"
|
||||
"github.com/gohugoio/hugo/common/hugo"
|
||||
"github.com/gohugoio/hugo/common/maps"
|
||||
"github.com/gohugoio/hugo/common/types"
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
"github.com/gohugoio/hugo/helpers"
|
||||
"github.com/gohugoio/hugo/langs"
|
||||
"github.com/gohugoio/hugo/tpl/compare"
|
||||
"github.com/spf13/cast"
|
||||
@@ -200,7 +200,7 @@ func (ns *Namespace) Dictionary(values ...any) (map[string]any, error) {
|
||||
// empty string.
|
||||
// Deprecated: Use the index function instead.
|
||||
func (ns *Namespace) EchoParam(c, k any) any {
|
||||
helpers.Deprecated("collections.EchoParam", "Use the index function instead.", false)
|
||||
hugo.Deprecate("collections.EchoParam", "Use the index function instead.", "v0.120.0")
|
||||
av, isNil := indirect(reflect.ValueOf(c))
|
||||
if isNil {
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user