Documentation ¶
Index ¶
- func ErrorLogger() gin.HandlerFunc
- func ErrorLoggerT(typ gin.ErrorType) gin.HandlerFunc
- func Logger() gin.HandlerFunc
- func LoggerWithConfig(conf log2.LoggerConfig) gin.HandlerFunc
- func LoggerWithFormatter(f log2.LogFormatter, logger *log.Logger, hasErr bool) gin.HandlerFunc
- func SetLog(app *gin.Engine, logger2 *log.Logger, errHandle bool)
- type ModName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorLogger ¶
func ErrorLogger() gin.HandlerFunc
ErrorLogger returns a handlerfunc for any error type.
func ErrorLoggerT ¶
func ErrorLoggerT(typ gin.ErrorType) gin.HandlerFunc
ErrorLoggerT returns a handlerfunc for a given error type.
func Logger ¶
func Logger() gin.HandlerFunc
Logger instances a Logger middleware that will write the logs to gin.DefaultWriter. By default gin.DefaultWriter = os.Stdout.
func LoggerWithConfig ¶
func LoggerWithConfig(conf log2.LoggerConfig) gin.HandlerFunc
LoggerWithConfig instance a Logger middleware with config.
func LoggerWithFormatter ¶
func LoggerWithFormatter(f log2.LogFormatter, logger *log.Logger, hasErr bool) gin.HandlerFunc
LoggerWithFormatter instance a Logger middleware with the specified log format function.
Types ¶
Click to show internal directories.
Click to hide internal directories.