1
0
mirror of https://github.com/containous/traefik.git synced 2024-12-22 13:34:03 +03:00
traefik/pkg/middlewares/middleware.go
Jean-Baptiste Doumenjou c0f1e74bed
chore: move to Traefik organization.
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
2020-09-16 15:46:04 +02:00

13 lines
357 B
Go

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