Skip to content

Commit

Permalink
log: skip 1 caller in ErrorFilterContextCanceled() (pingcap#392)
Browse files Browse the repository at this point in the history
so that not every log entry points to [log.go:93].
  • Loading branch information
kennytm authored Dec 3, 2019
1 parent 3d31d97 commit 4a8423b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (l Logger) ErrorFilterContextCanceled(msg string, fields ...zap.Field) {
}
}
}
l.Logger.Error(msg, fields...)
l.Logger.WithOptions(zap.AddCallerSkip(1)).Error(msg, fields...)
}

// logger for DM
Expand Down

0 comments on commit 4a8423b

Please sign in to comment.