Merge branch 'master' of github.com:d4l3k/gorm
This commit is contained in:
commit
34a3fd2a3a
3
scope.go
3
scope.go
@ -4,6 +4,7 @@ import (
|
||||
"database/sql/driver"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
@ -361,6 +362,8 @@ func (scope *Scope) InstanceGet(name string) (interface{}, bool) {
|
||||
// Trace print sql log
|
||||
func (scope *Scope) Trace(t time.Time) {
|
||||
if len(scope.Sql) > 0 {
|
||||
// TODO(d4l3k): Remove this line
|
||||
log.Println("sql", scope.Sql, scope.SqlVars)
|
||||
scope.db.slog(scope.Sql, t, scope.SqlVars...)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user