1
0
mirror of https://github.com/containous/traefik.git synced 2024-12-23 17:34:13 +03:00
traefik/pkg/middlewares/middleware.go
2019-09-13 19:28:04 +02:00

13 lines
367 B
Go

package middlewares
import (
"context"
"github.com/containous/traefik/v2/pkg/log"
)
// GetLoggerCtx creates a logger context with the middleware fields.
func GetLoggerCtx(ctx context.Context, middleware string, middlewareType string) context.Context {
return log.With(ctx, log.Str(log.MiddlewareName, middleware), log.Str(log.MiddlewareType, middlewareType))
}