mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-07 19:50:07 +08:00
Error code standardization
This commit is contained in:
parent
108685e8d0
commit
4acde81cc4
@ -30,7 +30,12 @@ func SetOperationID(ctx context.Context, operationID string) {
|
||||
|
||||
func ShowLog(ctx context.Context) {
|
||||
t := ctx.Value(TraceLogKey).(*ApiInfo)
|
||||
if ctx.Value(TraceLogKey).(*ApiInfo).GinCtx != nil {
|
||||
log.Info(t.OperationID, "api: ", t.ApiName)
|
||||
} else {
|
||||
log.Info(t.OperationID, "rpc: ", t.ApiName)
|
||||
}
|
||||
|
||||
for _, v := range *t.Funcs {
|
||||
if v.Err != nil {
|
||||
log.Error(t.OperationID, "func: ", v.FuncName, " args: ", v.Args, v.Err.Error())
|
||||
|
Loading…
x
Reference in New Issue
Block a user