Zap logging driver for gorm 1.
If you're using gorm v2, please go to https://github.com/moul/zapgorm2
import "moul.io/zapgorm"
db, _ := gorm.Open("sqlite3", "./db.sqlite")
db.SetLogger(zapgorm.New(zap.L().Named("gorm")))
db.LogMode(true)
Zap logging driver for gorm 1.
If you're using gorm v2, please go to https://github.com/moul/zapgorm2
import "moul.io/zapgorm"
db, _ := gorm.Open("sqlite3", "./db.sqlite")
db.SetLogger(zapgorm.New(zap.L().Named("gorm")))
db.LogMode(true)