mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-03 00:38:40 +08:00
This commit is contained in:
parent
fc59aec2e7
commit
74cc6b55e8
@ -22,7 +22,7 @@ func DurationInterceptor(ctx context.Context, method string, req, reply interfac
|
|||||||
start := timex.Now()
|
start := timex.Now()
|
||||||
err := invoker(ctx, method, req, reply, cc, opts...)
|
err := invoker(ctx, method, req, reply, cc, opts...)
|
||||||
if err != nil {
|
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())
|
serverName, req, err.Error())
|
||||||
} else {
|
} else {
|
||||||
elapsed := timex.Since(start)
|
elapsed := timex.Since(start)
|
||||||
|
Loading…
Reference in New Issue
Block a user