1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2024-12-22 13:51:18 +00:00
nginx-sso/vendor/google.golang.org/grpc/examples/features/debugging/README.md

29 lines
1,015 B
Markdown
Raw Normal View History

# Debugging
Currently, grpc provides two major tools to help user debug issues, which are logging and channelz.
## Logs
gRPC has put substantial logging instruments on critical paths of gRPC to help users debug issues.
The [Log Levels](https://github.com/grpc/grpc-go/blob/master/Documentation/log_levels.md) doc describes
what each log level means in the gRPC context.
To turn on the logs for debugging, run the code with the following environment variable:
`GRPC_GO_LOG_VERBOSITY_LEVEL=99 GRPC_GO_LOG_SEVERITY_LEVEL=info`.
## Channelz
We also provides a runtime debugging tool, Channelz, to help users with live debugging.
See the channelz blog post here ([link](https://grpc.io/blog/a_short_introduction_to_channelz)) for
details about how to use channelz service to debug live program.
## Try it
The example is able to showcase how logging and channelz can help with debugging. See the channelz
blog post linked above for full explanation.
```
go run server/main.go
```
```
go run client/main.go
```