-
Notifications
You must be signed in to change notification settings - Fork 34
✨main.go: switch to klog-based logger #419
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #419 +/- ##
==========================================
+ Coverage 35.56% 35.65% +0.08%
==========================================
Files 14 14
Lines 807 805 -2
==========================================
Hits 287 287
+ Misses 474 472 -2
Partials 46 46 ☔ View full report in Codecov by Sentry. |
| - --http2-disable | ||
| - --upstream=http://127.0.0.1:8080/ | ||
| - --logtostderr=true | ||
| - --v=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this to help vendors avoid problems if they want to patch in a different log level, which is common in enterprise environments.
| l.Info("reconcile starting") | ||
| defer l.Info("reconcile ending") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this to the 0 level, so that they continue to be output with the default log level.
|
As a test, I manually set |
7a82562 to
c98c9aa
Compare
Signed-off-by: Joe Lanford <[email protected]>
c98c9aa to
457adc7
Compare
Use standard klog now that klog works with controller-runtime's expectation of a logr.Logger interface.
We get a standard --v flag and we are more in line with k8s standards.
We also get client-go and other low-level logging from k8s libraries at the higher verbosity levels which could be immensely helpful for debugging.