package
module
Version:
v0.4.0
Opens a new window with list of versions in this module.
Published: Dec 14, 2020
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
README
¶
gorm-logrus
Logrus logger for gorm v2
Based on https://github.com/onrik/gorm-logrus
package main
import (
"gorm.io/gorm"
"gorm.io/driver/sqlite"
"github.com/nikolaistraessle/gorm-logrus"
)
func main() {
db, err := gorm.Open(sqlite.Open("test.db"), &gorm.Config{
Logger: gormlogrus.New(),
})
if err != nil {
panic("failed to connect database")
}
}
Documentation
¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.