Skip to content

Instantly share code, notes, and snippets.

View renevall's full-sized avatar
🏠
Working from home

Rene Vallecillo V renevall

🏠
Working from home
View GitHub Profile
import (
log "github.com/sirupsen/logrus"
"github.com/jinzhu/gorm"
)
type GormLogger struct {}
func (*GormLogger) Print(v ...interface{}) {
if v[0] == "sql" {
log.WithFields(log.Fields{"module": "gorm", "type": "sql"}).Print(v[3])