Replace the old log setup, with structured logging etc.

Fixes #11124
This commit is contained in:
Bjørn Erik Pedersen
2023-06-16 08:17:42 +02:00
parent 0e79446586
commit 7c9fada778
80 changed files with 1273 additions and 1082 deletions

View File

@@ -46,7 +46,7 @@ noclasses=false
func convert(c *qt.C, conf config.AllProvider, content string) converter.ResultRender {
pconf := converter.ProviderConfig{
Logger: loggers.NewErrorLogger(),
Logger: loggers.NewDefault(),
Conf: conf,
}
@@ -442,7 +442,7 @@ LINE5
conf := testconfig.GetTestConfig(nil, cfg)
pcfg := converter.ProviderConfig{
Conf: conf,
Logger: loggers.NewErrorLogger(),
Logger: loggers.NewDefault(),
}
p, err := goldmark.Provider.New(
pcfg,

View File

@@ -17,12 +17,11 @@ import (
"strings"
"testing"
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/config/testconfig"
"github.com/gohugoio/hugo/markup/converter/hooks"
"github.com/gohugoio/hugo/markup/goldmark"
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/markup/converter"
qt "github.com/frankban/quicktest"
@@ -56,7 +55,7 @@ And then some.
p, err := goldmark.Provider.New(
converter.ProviderConfig{
Conf: testconfig.GetTestConfig(nil, nil),
Logger: loggers.NewErrorLogger(),
Logger: loggers.NewDefault(),
})
c.Assert(err, qt.IsNil)
conv, err := p.New(converter.DocumentContext{})
@@ -86,12 +85,12 @@ func TestEscapeToc(t *testing.T) {
safeP, _ := goldmark.Provider.New(
converter.ProviderConfig{
Conf: safeConf(),
Logger: loggers.NewErrorLogger(),
Logger: loggers.NewDefault(),
})
unsafeP, _ := goldmark.Provider.New(
converter.ProviderConfig{
Conf: unsafeConf(),
Logger: loggers.NewErrorLogger(),
Logger: loggers.NewDefault(),
})
safeConv, _ := safeP.New(converter.DocumentContext{})
unsafeConv, _ := unsafeP.New(converter.DocumentContext{})