diff options
Diffstat (limited to 'transform')
-rw-r--r-- | transform/livereloadinject/livereloadinject.go | 5 | ||||
-rw-r--r-- | transform/metainject/hugogenerator.go | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/transform/livereloadinject/livereloadinject.go b/transform/livereloadinject/livereloadinject.go index d57ba4d24..a29a64ebb 100644 --- a/transform/livereloadinject/livereloadinject.go +++ b/transform/livereloadinject/livereloadinject.go @@ -20,7 +20,8 @@ import ( "net/url" "strings" - "github.com/gohugoio/hugo/helpers" + "github.com/gohugoio/hugo/common/loggers" + "github.com/gohugoio/hugo/transform" ) @@ -90,7 +91,7 @@ func New(baseURL url.URL) transform.Transformer { c = append(c[:i], append(script, c[i:]...)...) if _, err := ft.To().Write(c); err != nil { - helpers.DistinctWarnLog.Println("Failed to inject LiveReload script:", err) + loggers.Log().Warnf("Failed to inject LiveReload script:", err) } return nil } diff --git a/transform/metainject/hugogenerator.go b/transform/metainject/hugogenerator.go index fd3a6a4ab..43a477354 100644 --- a/transform/metainject/hugogenerator.go +++ b/transform/metainject/hugogenerator.go @@ -19,7 +19,7 @@ import ( "regexp" "github.com/gohugoio/hugo/common/hugo" - "github.com/gohugoio/hugo/helpers" + "github.com/gohugoio/hugo/common/loggers" "github.com/gohugoio/hugo/transform" ) @@ -33,7 +33,7 @@ func HugoGenerator(ft transform.FromTo) error { b := ft.From().Bytes() if metaTagsCheck.Match(b) { if _, err := ft.To().Write(b); err != nil { - helpers.DistinctWarnLog.Println("Failed to inject Hugo generator tag:", err) + loggers.Log().Warnf("Failed to inject Hugo generator tag: %s", err) } return nil } @@ -49,7 +49,7 @@ func HugoGenerator(ft transform.FromTo) error { } if _, err := ft.To().Write(newcontent); err != nil { - helpers.DistinctWarnLog.Println("Failed to inject Hugo generator tag:", err) + loggers.Log().Warnf("Failed to inject Hugo generator tag: %s", err) } return nil |