zapCfg := zap.NewProductionConfig()
zapCfg.Level = zap.NewAtomicLevelAt(zap.DebugLevel) // whatever minimum level
zapCfg.DisableCaller = true
logger, _ := zapCfg.Build()
// populate log pre-fields here before set to OpenDriver
db := sqldblogger.OpenDriver(
dsn,
&mysql.MySQLDriver{},
zapadapter.New(logger),
// optional config...
)
zapadapter
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||