]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
tocss/dartsas: Avoid using Logf for the internal Dart Sass logging
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 19 Jun 2023 11:27:03 +0000 (13:27 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 19 Jun 2023 11:27:03 +0000 (13:27 +0200)
As that does not work when percentages are used in the log messages.

resources/resource_transformers/tocss/dartsass/client.go

index 63278f0db24ad98dabafc86d2cded019886856ab..929900ca8fd46987ada3e188d390dd813913fc6e 100644 (file)
@@ -22,6 +22,7 @@ import (
 
        godartsassv1 "github.com/bep/godartsass"
        "github.com/bep/godartsass/v2"
+       "github.com/bep/logg"
        "github.com/gohugoio/hugo/common/herrors"
        "github.com/gohugoio/hugo/common/hugo"
        "github.com/gohugoio/hugo/helpers"
@@ -70,10 +71,10 @@ func New(fs *filesystems.SourceFilesystem, rs *resources.Spec) (*Client, error)
                                switch event.Type {
                                case godartsass.LogEventTypeDebug:
                                        // Log as Info for now, we may adjust this if it gets too chatty.
-                                       infol.Logf(message)
+                                       infol.Log(logg.String(message))
                                default:
                                        // The rest are either deprecations or @warn statements.
-                                       warnl.Logf(message)
+                                       warnl.Log(logg.String(message))
                                }
                        },
                })
@@ -86,10 +87,10 @@ func New(fs *filesystems.SourceFilesystem, rs *resources.Spec) (*Client, error)
                                switch event.Type {
                                case godartsassv1.LogEventTypeDebug:
                                        // Log as Info for now, we may adjust this if it gets too chatty.
-                                       infol.Logf(message)
+                                       infol.Log(logg.String(message))
                                default:
                                        // The rest are either deprecations or @warn statements.
-                                       warnl.Logf(message)
+                                       warnl.Log(logg.String(message))
                                }
                        },
                })