自定义gorm的logger

This commit is contained in:
SliverHorn
2020-11-24 19:27:16 +08:00
parent 85fce8f01e
commit c2a55931bb
4 changed files with 154 additions and 0 deletions

View File

@@ -9,4 +9,5 @@ type Mysql struct {
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
LogMode bool `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`
LogZap bool `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"`
}