gormlog
Zerolog logging for gorm
Installation
go get -u github.com/petoem/gormlog
Usage
import (
"gorm.io/gorm"
"gorm.io/driver/sqlite"
"github.com/rs/zerolog/log"
"github.com/petoem/gormlog"
)
logger := gormlog.NewLogger(log.Logger)
db, err = gorm.Open(sqlite.Open("db.sqlite"), &gorm.Config{Logger: logger})
Contributing
If you wish to contribute to the code or documentation, feel free to fork the repository and submit a pull request.
License
Licensed under the MIT license.