fix(logger): Fixed fc
is nil
This commit is contained in:
parent
40f4afe8c2
commit
e8e9ab1492
@ -153,6 +153,10 @@ func (l *logger) Error(ctx context.Context, msg string, data ...interface{}) {
|
|||||||
//
|
//
|
||||||
//nolint:cyclop
|
//nolint:cyclop
|
||||||
func (l *logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) {
|
func (l *logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) {
|
||||||
|
if fc == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if l.LogLevel <= Silent {
|
if l.LogLevel <= Silent {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user