go-zero
go-zero copied to clipboard
gozero rpc error print
hi, i have a logic code in rpc service below:
i use grpc error to pass error to api service to indicate error info.
but gozero interceptor will print error in https://github.com/zeromicro/go-zero/blob/master/zrpc/internal/clientinterceptors/durationinterceptor.go like below:
error like Invalid Argument should not print error log while this error is caused by user input. and duration interceptor is used to print slow call error log, grpc error print should not put in it.
so i suggest if it is possible to remove error log print in duration interceptor?
https://github.com/zeromicro/go-zero/issues/1886 You can refer to this to filter out
I think filtering through string matching, it will waste CPU resources. Why not add an option to the log output at this location?
Customizing error codes in business should be a common behavior, right?
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.