diff --git a/internal/aghslog/aghslog.go b/internal/aghslog/aghslog.go index 9fdce880..c307f344 100644 --- a/internal/aghslog/aghslog.go +++ b/internal/aghslog/aghslog.go @@ -41,7 +41,7 @@ const ( UpstreamTypeService = "service" // UpstreamTypeTest is the log attribute value for upstreams used for - // testing. + // testing and validation. UpstreamTypeTest = "test" ) diff --git a/internal/client/persistent.go b/internal/client/persistent.go index fc925442..1d1967a2 100644 --- a/internal/client/persistent.go +++ b/internal/client/persistent.go @@ -10,6 +10,7 @@ import ( "slices" "strings" + "github.com/AdguardTeam/AdGuardHome/internal/aghslog" "github.com/AdguardTeam/AdGuardHome/internal/filtering" "github.com/AdguardTeam/dnsproxy/proxy" "github.com/AdguardTeam/dnsproxy/upstream" @@ -143,7 +144,7 @@ func (c *Persistent) validate(ctx context.Context, l *slog.Logger, allTags []str } conf, err := proxy.ParseUpstreamsConfig(c.Upstreams, &upstream.Options{ - Logger: slogutil.NewDiscardLogger(), + Logger: l.With(aghslog.KeyUpstreamType, aghslog.UpstreamTypeTest), }) if err != nil { return fmt.Errorf("invalid upstream servers: %w", err)