Documentation ¶
Overview ¶
Package logger provides a middleware for logging with Gin using logrus
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogOptions ¶
type LogOptions struct {
EnableStarting bool
}
LogOptions logging middleware options
type LoggingMiddleware ¶
type LoggingMiddleware struct {
// contains filtered or unexported fields
}
LoggingMiddleware is a middleware handler that logs the request as it goes in and the response as it goes out.
func New ¶
func New(l *logrus.Logger, options LogOptions) *LoggingMiddleware
New returns a new *LoggingMiddleware, yay!
func (*LoggingMiddleware) HandleFunc ¶
func (m *LoggingMiddleware) HandleFunc(context *gin.Context)
HandleFunc is the function for processing requests in the chain and logging
Click to show internal directories.
Click to hide internal directories.