New logger for the Traefik logs

This commit is contained in:
Ludovic Fernandez 2022-11-21 18:36:05 +01:00 committed by GitHub
parent 27c02b5a56
commit 56f7515ecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
297 changed files with 2337 additions and 1934 deletions

View file

@ -10,8 +10,8 @@ import (
"sync"
"github.com/lucas-clemente/quic-go/http3"
"github.com/rs/zerolog/log"
"github.com/traefik/traefik/v2/pkg/config/static"
"github.com/traefik/traefik/v2/pkg/log"
tcprouter "github.com/traefik/traefik/v2/pkg/server/router/tcp"
)
@ -56,7 +56,7 @@ func newHTTP3Server(ctx context.Context, configuration *static.EntryPoint, https
httpsServer.Server.(*http.Server).Handler = http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
if err := h3.Server.SetQuicHeaders(rw.Header()); err != nil {
log.FromContext(ctx).Errorf("Failed to set HTTP3 headers: %v", err)
log.Ctx(ctx).Error().Err(err).Msg("Failed to set HTTP3 headers")
}
previousHandler.ServeHTTP(rw, req)