Skip to content

Commit

Permalink
tocss/dartsas: Avoid using Logf for the internal Dart Sass logging
Browse files Browse the repository at this point in the history
As that does not work when percentages are used in the log messages.
  • Loading branch information
bep committed Jun 19, 2023
1 parent fdb0b7f commit 3ca29b1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions resources/resource_transformers/tocss/dartsass/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))
}
},
})
Expand All @@ -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))
}
},
})
Expand Down

0 comments on commit 3ca29b1

Please sign in to comment.