Skip to content

plan, controller: drop noisy INFO endpoint dumps; use ErrorS#82

Merged
tamalsaha merged 1 commit into
masterfrom
refactor/quiet-noisy-logs
Jun 6, 2026
Merged

plan, controller: drop noisy INFO endpoint dumps; use ErrorS#82
tamalsaha merged 1 commit into
masterfrom
refactor/quiet-noisy-logs

Conversation

@tamalsaha

Copy link
Copy Markdown
Contributor

Summary

  • `createAndApplyPlan` logged the full desired/current endpoint slices at INFO on every reconcile. At any non-trivial zone size that's huge, unstructured, and contains target IPs nobody wants in steady-state operator logs. Replaced with a structured one-line summary at `V(2)` (counts only) and the full dump at `V(4)` for debugging.
  • Replace `klog.Error(err.Error())` / `klog.Errorln(err)` with `klog.ErrorS` so the structured logger gets a real `err` field and a short message per failure site.
  • In the controller, `klog.Error("failed to build controller.", err.Error())` passed two args to a variadic-interface function and dropped the structured field. Switched to `klog.ErrorS`.

Test plan

  • `go build ./...`
  • Run with `-v=0` and confirm endpoint dumps are gone; `-v=4` brings them back

createAndApplyPlan logged the entire desired/current endpoint slices at
INFO every reconcile. At any non-trivial zone size this is large,
unstructured, and includes target IPs we don't need in steady-state
operator logs. Emit a structured one-line summary at V(2) with counts,
and keep the full dump at V(4) for debugging.

Same file: replace klog.Error(err.Error()) and klog.Errorln(err) with
klog.ErrorS so the structured logger gets a real "err" field instead
of stringified output, and add a short message for each failure site.

In the controller, klog.Error("failed to build controller.", err.Error())
was passing two args to a function that takes variadic interfaces —
losing the structured "err" field. Switch to klog.ErrorS.

Signed-off-by: Tamal Saha <tamal@appscode.com>
@tamalsaha tamalsaha merged commit 3128cec into master Jun 6, 2026
4 checks passed
@tamalsaha tamalsaha deleted the refactor/quiet-noisy-logs branch June 6, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant