add log grpc handler err (#1973)
Co-authored-by: wangxu <wangxu@oneniceapp.com>
This commit is contained in:
parent
bf8b3aeac7
commit
3a96135df8
@ -194,6 +194,10 @@ func (g *grpcServer) handler(srv interface{}, stream grpc.ServerStream) (err err
|
|||||||
logger.Error(string(debug.Stack()))
|
logger.Error(string(debug.Stack()))
|
||||||
}
|
}
|
||||||
err = errors.InternalServerError(g.opts.Name, "panic recovered: %v", r)
|
err = errors.InternalServerError(g.opts.Name, "panic recovered: %v", r)
|
||||||
|
} else if err != nil {
|
||||||
|
if logger.V(logger.InfoLevel, logger.DefaultLogger) {
|
||||||
|
logger.Errorf("grpc handler got error: %s", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user