Log plugin RPC operations and connections#71
Conversation
Signed-off-by: Gunjan Vyas <vyasgun20@gmail.com>
Signed-off-by: Gunjan Vyas <vyasgun20@gmail.com>
WalkthroughStructured logging is added to the RPC driver plugin layer: a ChangesRPC Driver Logging and Cleanup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| fmt.Println(listener.Addr()) | ||
|
|
||
| go func() { | ||
| //nolint:gosec // localhost-only rpc server |
There was a problem hiding this comment.
What was the gosec error?
You can replace
//nolint:gosec // localhost-only rpc server
with
//#nosec G703 localhost-only RPC server
with G703 replaced with the actual gosec error would provide more details
| - gofmt | ||
| - gosec | ||
| - gocritic | ||
| - deadcode |
There was a problem hiding this comment.
Is unused enabled by defaut?
For what it’s worth, this golangci-lint config is a v1 config while upstream has moved on to v2. Not sure it’s worth switching to v2 though…
| } | ||
|
|
||
| func (r *RPCServerDriver) DriverName(_ *struct{}, reply *string) error { | ||
| r.logRPC("DriverName", log.DebugLevel, nil) |
There was a problem hiding this comment.
How did you decide between the various log levels?
This PR also fixes linter warnings and deprecations
Logs visible in
~/.crc/crcd.logas follows: