Documentation
¶
Index ¶
- func Debug(msg string, value interface{})
- func Error(msg string, value interface{})
- func Fatal(msg string, value interface{})
- func GinLogger() gin.HandlerFunc
- func GinRecovery(stack bool) gin.HandlerFunc
- func Info(msg string, value interface{})
- func Init(mode string) (err error)
- func Warn(msg string, value interface{})
- type LogConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinRecovery ¶
func GinRecovery(stack bool) gin.HandlerFunc
GinRecovery recover掉项目可能出现的panic,并使用zap记录相关日志
Types ¶
type LogConfig ¶
type LogConfig struct { Level string `mapstructure:"level" json:"level"` Filename string `mapstructure:"filename" json:"filename"` MaxSize int `mapstructure:"max_size" json:"max_size"` MaxAge int `mapstructure:"max_age" json:"max_age"` MaxBackups int `mapstructure:"max_backups" json:"max_backups"` }
Click to show internal directories.
Click to hide internal directories.