2023-10-14 16:06:02 +00:00
|
|
|
package middlewares
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
2023-10-15 15:49:33 +00:00
|
|
|
func WithLogger(handler http.Handler, l *logrus.Logger) http.Handler {
|
|
|
|
return &LoggerMiddleware{
|
|
|
|
l: l,
|
|
|
|
h: handler,
|
2023-10-14 16:06:02 +00:00
|
|
|
}
|
|
|
|
}
|