Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// Logger is the log.Logger instance used to log messages with the Logger middleware
Logger *logrus.Logger
// Name is the name of the application as recorded in latency metrics
Name string
}
Middleware is a middleware handler that logs the request as it goes in and the response as it goes out.
func NewCustomMiddleware ¶
NewCustomMiddleware builds a *Middleware with the given level and formatter
func (*Middleware) ServeHTTP ¶
func (l *Middleware) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Source Files
¶
- middleware.go
Click to show internal directories.
Click to hide internal directories.