fix(logger): Fixed fc is nil

This commit is contained in:
Flc゛ 2023-11-07 11:07:07 +08:00
parent 40f4afe8c2
commit e8e9ab1492

View File

@ -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
} }