🎨 日志打印优化
This commit is contained in:
parent
4430e8c666
commit
2624771842
2
gorm.go
2
gorm.go
@ -55,7 +55,7 @@ func (l gormLogger) Trace(ctx context.Context, begin time.Time, fc func() (strin
|
|||||||
sql, rows := fc()
|
sql, rows := fc()
|
||||||
msg := fmt.Sprintf("[%v] [rows:%v] %s", elapsed.String(), rows, sql)
|
msg := fmt.Sprintf("[%v] [rows:%v] %s", elapsed.String(), rows, sql)
|
||||||
if rows == -1 {
|
if rows == -1 {
|
||||||
msg = fmt.Sprintf("%s [-] %s", elapsed.String(), sql)
|
msg = fmt.Sprintf("[%s] [-] %s", elapsed.String(), sql)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
|
Loading…
Reference in New Issue
Block a user