From 74cc6b55e84d9aa0e6baa7c8470cbe18b11f4efc Mon Sep 17 00:00:00 2001 From: #Suyghur Date: Tue, 11 Oct 2022 21:45:31 +0800 Subject: [PATCH] fix: replace Infof() with Errorf() in DurationInterceptor (#2495) (#2497) --- zrpc/internal/clientinterceptors/durationinterceptor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zrpc/internal/clientinterceptors/durationinterceptor.go b/zrpc/internal/clientinterceptors/durationinterceptor.go index 1abf0002..3f65a8bf 100644 --- a/zrpc/internal/clientinterceptors/durationinterceptor.go +++ b/zrpc/internal/clientinterceptors/durationinterceptor.go @@ -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)