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

Add structured logging via zap #133

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

galal-hussein
Copy link
Collaborator

The PR adds the following:

  • Removes different log messages
  • Removes the wrong wrapper function
  • Adds structured logging (zap) with a wrapper to be used in virtual-kubelet as well
  • Configure controller-runtime with the reconciler logger
  • Configure the logger for each controller to have a different fields according to the controller logic

Issue:

use a centralized logger wrapper to work with controller and virt-kubelet

Signed-off-by: galal-hussein <[email protected]>
Signed-off-by: galal-hussein <[email protected]>
pkg/log/zap.go Outdated Show resolved Hide resolved
pkg/log/zap.go Outdated Show resolved Hide resolved
k3k-kubelet/kubelet.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
Signed-off-by: galal-hussein <[email protected]>
@galal-hussein galal-hussein merged commit f04902f into rancher:main Oct 21, 2024
1 check passed
briandowns pushed a commit to briandowns/k3k that referenced this pull request Dec 4, 2024
* Add structured logging properly

use a centralized logger wrapper to work with controller and virt-kubelet

Signed-off-by: galal-hussein <[email protected]>

* Fix some log messages

Signed-off-by: galal-hussein <[email protected]>

* fixes

Signed-off-by: galal-hussein <[email protected]>

---------

Signed-off-by: galal-hussein <[email protected]>
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.

2 participants