-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for logr #37
Conversation
Convert to structured log support
Change-Id: I92207e2ca9bbd88a8780912a3aef297685c917f6
Change-Id: I3117562d1eecee175ac06443a79b717296f6149e
Change-Id: I813d542005959293327057ff3ddf81da4e454581
Change-Id: Ia25673d014bcfc1f23aee7cb4856e1e24cba02fb
Change-Id: I4e2c5a7ff5b2526bafac0cd17836b3377a91339d
/assign @thockin |
/assign @vincepri @thockin @DirectXMan12 |
/hold (for discussion) |
cc @munnerz |
klogr/klogr.go
Outdated
"k8s.io/klog" | ||
) | ||
|
||
// New returns a logr.Logger which is implemented by glog. |
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.
s/glog/klog
klogr/klogr.go
Outdated
return new | ||
} | ||
|
||
// WithName returns a new logr.Logger with the specified name appended. glogr |
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.
s/glog/klog
Change-Id: Ie02835fa7e1fb01ccfe64deb30a414cabae70067
6808784
to
2ecd970
Compare
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, thockin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Do we need the hold? |
/hold cancel |
Just a tiny bit nicer to read.
What this PR does / why we need it:
We have libraries like k8s.io/utils that need logging, we should have a way to use the
logr
in these scenarios. For example see kubernetes/utils#70Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: