Skip to content

Latest commit

 

History

History

zapadapter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

SQLDB-LOGGER ZAP ADAPTER

stdout sample

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...
)