summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-10-26 09:38:13 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-10-26 20:41:19 +0200
commit71fd79a3f44101ef515349a24527e6c0b566f368 (patch)
tree4bd1763b0b09a5767ee5501b6df298fd12efc6d2 /source
parentc4a530f104f2b0d1dd82211b77b603a07db7c181 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/fileInfo.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/fileInfo.go b/source/fileInfo.go
index c58a0c3b9..60c6e6ea8 100644
--- a/source/fileInfo.go
+++ b/source/fileInfo.go
@@ -21,6 +21,7 @@ import (
"time"
"github.com/bep/gitmap"
+ "github.com/gohugoio/hugo/common/hugo"
"github.com/gohugoio/hugo/common/paths"
"github.com/gohugoio/hugo/hugofs/files"
@@ -63,7 +64,6 @@ type fileOverlap interface {
}
type FileWithoutOverlap interface {
-
// Filename gets the full path and filename to the file.
Filename() string
@@ -102,7 +102,6 @@ type FileWithoutOverlap interface {
// FileInfo describes a source file.
type FileInfo struct {
-
// Absolute filename to the file on disk.
filename string
@@ -143,7 +142,7 @@ func (fi *FileInfo) Dir() string { return fi.relDir }
// Extension is an alias to Ext().
func (fi *FileInfo) Extension() string {
- helpers.Deprecated(".File.Extension", "Use .File.Ext instead. ", false)
+ hugo.Deprecate(".File.Extension", "Use .File.Ext instead.", "v0.96.0")
return fi.Ext()
}