This allows me to get HTTP/2 debug logs: https://github.com/golang/net/blob/290c469a71a567d354e4abd335577aba44c4bde4/http2/http2.go#L41-L50
...But unlike the gRPC package, I can't specify my own logger. I also can't change the log level at runtime (I can toggle VerboseLogs since that's exported, but not logFrameWrites and logFrameReads).
For logging format consistency and runtime configuration of log levels it would be great to provide my own logger. I suppose this would also require a switch to level-based logging instead of e.g. log.Printf(); I don't know if the structure of logs is covered by the Go compatibility guarantee and if so this would need to be done in a way that doesn't break it (maybe all debug level with no formatting change in the default logger implementation?)
Thanks for considering this!
This allows me to get HTTP/2 debug logs: https://github.com/golang/net/blob/290c469a71a567d354e4abd335577aba44c4bde4/http2/http2.go#L41-L50
...But unlike the gRPC package, I can't specify my own logger. I also can't change the log level at runtime (I can toggle
VerboseLogssince that's exported, but notlogFrameWritesandlogFrameReads).For logging format consistency and runtime configuration of log levels it would be great to provide my own logger. I suppose this would also require a switch to level-based logging instead of e.g.
log.Printf(); I don't know if the structure of logs is covered by the Go compatibility guarantee and if so this would need to be done in a way that doesn't break it (maybe alldebuglevel with no formatting change in the default logger implementation?)Thanks for considering this!