Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggerWithConfig ¶ added in v1.1.0
func NewLoggerWithConfig(conf LoggerConfig) func(c *gin.Context)
NewLoggerWithConfig instance a Logger middleware with config.
Types ¶
type LoggerConfig ¶ added in v1.1.0
type LoggerConfig struct {
// Logger is a logrus logger
Logger *logrus.Logger
// Optional. Default value is defaultLogFormatter
Formatter gin.LogFormatter
// SkipPaths is a url path array which logs are not written
// Optional
SkipPaths []string
}
LoggerConfig defines the config for Logger middleware
Click to show internal directories.
Click to hide internal directories.