traefik/responsemodifiers/log.go

14 lines
405 B
Go
Raw Normal View History

2018-11-14 09:18:03 +00:00
package responsemodifiers
import (
"context"
"github.com/containous/traefik/log"
"github.com/sirupsen/logrus"
)
// getLogger creates a logger configured with the middleware fields.
func getLogger(ctx context.Context, middleware string, middlewareType string) logrus.FieldLogger {
return log.FromContext(ctx).WithField(log.MiddlewareName, middleware).WithField(log.MiddlewareType, middlewareType)
}