9
A
回答
15
您可以將GRPC_TRACE
環境變量設置爲all
有GRPC傾倒了一大堆的數據什麼的連接是這樣做的:
export GRPC_TRACE=all
編輯從評論:顯然你還需要設置:
export GRPC_VERBOSITY=DEBUG
1
在Golang,你需要設置GODEBUG
environment variable看到HTTP2痕跡,即由報頭設置GRPC:
GODEBUG=http2debug=1 # enable verbose HTTP/2 debug logs
GODEBUG=http2debug=2 # ... even more verbose, with frame dumps
輸出將被髮送到標準輸出。這裏是一個例子:
{"level":"info","msg":"2017/06/11 08:52:20 http2: Framer 0xc42009c0e0: wrote SETTINGS len=0","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: Framer 0xc42009c0e0: wrote WINDOW_UPDATE len=4 (conn) incr=983025","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: Framer 0xc42009c0e0: read SETTINGS len=18, settings: ENABLE_PUSH=0, MAX_CONCURRENT_STREAMS=0, INITIAL_WINDOW_SIZE=1048576","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: Framer 0xc42009c0e0: read WINDOW_UPDATE len=4 (conn) incr=983041","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: Framer 0xc42009c0e0: wrote SETTINGS flags=ACK len=0","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: Framer 0xc42009c0e0: read SETTINGS flags=ACK len=0","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: Framer 0xc42009c0e0: read HEADERS flags=END_HEADERS|PRIORITY stream=3 len=249","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \":authority\" = \"\"","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \":path\" = \"/internal.push.v1.UnifiedDevicePush/SendMessage\"","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \":method\" = \"POST\"","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \":scheme\" = \"http\"","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \"content-type\" = \"application/grpc\"","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \"te\" = \"trailers\"","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \"user-agent\" = \"grpc-java-netty/1.0.3\"","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \"root-common.xirequestid-bin\" = \"ChIJzE6lBfCTCsYRoIIJujc92JY=\"","time":"2017-06-11T08:52:20Z"}
{"level":"info","msg":"2017/06/11 08:52:20 http2: decoded hpack field header field \"te\" = \"trailers\"","time":"2017-06-11T08:52:20Z"}
+0
@Dominik - 感謝您的編輯。我寫這個答案時一定很高:/ – FuzzyAmi
相關問題
- 1. 如何調試gRPC-Go服務?
- 2. 如何驗證Assistant SDK的gRPC調用?
- 3. 如何調試Rscript調用
- 4. 如何調試JS調用
- 5. 如何調試SOAP調用?
- 6. 如何調試MobileSubstrate調整?
- 7. 如何調試
- 8. 如何調試jQuery AJAX調用?
- 9. 如何調試C++ dll調用C++ DllImport
- 10. 如何調試C++ dll的ctypes調用?
- 11. PHPUnit - 如何測試回調被調用?
- 12. 如何調試AuthorizeAttribute和FormsAuthentication調用
- 13. 如何在Python中調試win32com調用
- 14. 如何調試未調用的__del __()
- 15. 如何調試$ http異步調用?
- 16. 如何調試.NET遠程調用?
- 17. 如何調試AJAX REST調用(一般)
- 18. 如何調試自定義調試器?
- 19. 如何通過調試進行調試?
- 20. 如何測試EntityManager.persist()調用
- 21. 如何調試使用Wireshark
- 22. 如何使用調試點?
- 23. 如何用PyDev調試Flask?
- 24. 如何使用GDB調試
- 25. 如何啓用USB調試
- 26. 如何啓用Tomcat調試
- 27. 如何調試TreeNodeCollection
- 28. 如何調試Gruntfile.js?
- 29. 如何調試ClojureScript
- 30. 如何調試SocketTimeoutException?
我試過這個,並沒有看到控制檯中的任何東西。在你的應用程序中是否有其他的東西來獲得輸出結果? – PudgePacket
啊,發現它https://github.com/grpc/grpc/issues/7960#issuecomment-250801871 – PudgePacket
https://github.com/grpc/grpc/blob/master/doc/environment_variables.md –