Move code to pkg
This commit is contained in:
parent
bd4c822670
commit
f1b085fa36
465 changed files with 656 additions and 680 deletions
13
pkg/middlewares/middleware.go
Normal file
13
pkg/middlewares/middleware.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package middlewares
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/containous/traefik/pkg/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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue