-
Story
-
Resolution: Won't Do
-
Minor
-
None
-
None
-
None
-
2
-
False
-
False
-
Description
This is a tech debt story to fix our usage of the logger in our controller code. In a few places (like here and here) we incorrectly use the logr.WithValues method. We should setting our logger to the value returned by the function call, instead of ignoring the return value. This will properly propagate our desired values into the log output.
Engineering Details
Logr docs:
// With logr's structured logging, we'd write:
// // elsewhere in the file, set up the logger to log with the prefix of
// // "reconcilers", and the named value target-type=Foo, for extra context.
// log := mainLogger.WithName("reconcilers").WithValues("target-type", "Foo")
Acceptance Criteria
- logging calls in the Reconcilers properly includes the given values (watch object's name and namespace)
- removal of redundant information in log calls