Skip to content

Commit

Permalink
impl LogMode for logger (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
qqxhb authored Jul 28, 2023
1 parent 3522352 commit 6282769
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ type resolverModeLogger struct {
logger.Interface
}

func (l resolverModeLogger) LogMode(level logger.LogLevel) logger.Interface {
l.Interface = l.Interface.LogMode(level)
return l
}

func (l resolverModeLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {
var splitFn = func() (sql string, rowsAffected int64) {
sql, rowsAffected = fc()
Expand Down

0 comments on commit 6282769

Please sign in to comment.