fix: replace Infof() with Errorf() in DurationInterceptor (#2495) (#2497)

master
#Suyghur 2 years ago committed by GitHub
parent fc59aec2e7
commit 74cc6b55e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,7 +22,7 @@ func DurationInterceptor(ctx context.Context, method string, req, reply interfac
start := timex.Now()
err := invoker(ctx, method, req, reply, cc, opts...)
if err != nil {
logx.WithContext(ctx).WithDuration(timex.Since(start)).Infof("fail - %s - %v - %s",
logx.WithContext(ctx).WithDuration(timex.Since(start)).Errorf("fail - %s - %v - %s",
serverName, req, err.Error())
} else {
elapsed := timex.Since(start)

Loading…
Cancel
Save