🎨 日志打印优化

This commit is contained in:
李寻欢 2022-03-17 10:48:11 +08:00
parent 4430e8c666
commit 2624771842

View File

@ -55,7 +55,7 @@ func (l gormLogger) Trace(ctx context.Context, begin time.Time, fc func() (strin
sql, rows := fc()
msg := fmt.Sprintf("[%v] [rows:%v] %s", elapsed.String(), rows, sql)
if rows == -1 {
msg = fmt.Sprintf("%s [-] %s", elapsed.String(), sql)
msg = fmt.Sprintf("[%s] [-] %s", elapsed.String(), sql)
}
switch {