Skip to content
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

Replace klog with a new logging library #1170

Closed
dramich opened this issue Apr 19, 2022 · 4 comments
Closed

Replace klog with a new logging library #1170

dramich opened this issue Apr 19, 2022 · 4 comments
Assignees

Comments

@dramich
Copy link
Contributor

dramich commented Apr 19, 2022

This issue is to gather feedback on a replacements for klog

Currently klog presents us with some challenges:

  1. The way it parses args see here
  2. It's slow (this is known and part of the reason k8s is moving to structured logging backed by zap)

Proposed solution:

  1. Update our log package to use this new library and where a logger struct is referenced move to https://github.com/go-logr/logr
  2. Replace klog inside the log package with https://github.com/rs/zerolog.
  3. Move all direct calls to klog over to the log library
@michaelmdresser
Copy link
Collaborator

I'm on board! A couple of questions:

  1. Do we need logr? I'm not familiar with the library or where we would apply it.

  2. Since zerolog supports structured logging, do you have any recommendations for what fields to log and when?

@dwbrown2
Copy link
Collaborator

Not sure what the lift is here, but would this be a good potential addition for 1.94?

@pierluigilenoci
Copy link

Klog also has another major problem: kubernetes/klog#212

@michaelmdresser
Copy link
Collaborator

I believe this has been addressed in #1178. I'm going to close this issue -- feel free to reopen if needed.

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

No branches or pull requests

4 participants