|
|
@ -69,8 +69,7 @@ func logDuration(ctx context.Context, method string, req interface{}, duration t
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
logx.WithContext(ctx).Errorf("%s - %s", addr, err.Error())
|
|
|
|
logx.WithContext(ctx).Errorf("%s - %s", addr, err.Error())
|
|
|
|
} else if duration > slowThreshold.Load() {
|
|
|
|
} else if duration > slowThreshold.Load() {
|
|
|
|
logger.Slowf("[RPC] slowcall - %s - %s - %s",
|
|
|
|
logger.Slowf("[RPC] slowcall - %s - %s - %s", addr, method, string(content))
|
|
|
|
addr, method, string(content))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
logger.Infof("%s - %s - %s", addr, method, string(content))
|
|
|
|
logger.Infof("%s - %s - %s", addr, method, string(content))
|
|
|
|
}
|
|
|
|
}
|
|
|
|