fix: log klog, gRPC and stdlib output as JSON #59
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/klog-json-logging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The controller logs mostly JSON, but client-go's leader election writes plain klog lines in between:
controller-runtime's zap logger only covers code that logs through
ctrl.Log. Three dependencies of both binaries keep their own loggers and default to plain text:lognet/httpserver errors, e.g. failed TLS handshakes on the webhook/metrics serversinternal/logging.Setupbuilds the zap logger once and installs it for all four; the controller and provisioner call it in place ofctrl.SetLogger. gRPC is held at error level, matching grpclog's default severity, so info-level connectivity chatter does not start appearing. klog, gRPC and stdlib lines carryloggernamesklog,grpcandstdlog.zapr,zapandklog/v2move from indirect to direct requirements; no versions change.Testing:
internal/logginghas a test that emits through each source and asserts every line parses as JSON and gRPC info is filtered.make buildandmake testpass.🤖 Generated with Claude Code
Automated review by pr-reviewer v0.54.0 | Safety Check | Nemotron 3 Nano | tracking id
r-e1169d-981e41This is an AI-generated review and may contain mistakes.
Status: ❌ Failed
Review failed. Tracking id
r-e1169d-981e41— see logs for details.Comment
@pr-reviewer-bot retryto try again.