-
Notifications
You must be signed in to change notification settings - Fork 14
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
use zap.NewDevelopmentConfig to setup logger #85
Conversation
1a2082d
to
2a0812a
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.
nice addition :)
/ok-to-test
@mansam could you please rebase your branch on the latest changes? |
2a0812a
to
18a285f
Compare
@thepetk done :) |
The Zap library provides a logger config that can be used without pulling in controller-runtime as a dependency. Since alizer is only using a few options, the dependency on controller-runtime can be avoided by using zap's NewDevelopmentConfig (which sets the development flag and the ISO8601 time encoder), and setting the log level on that. Signed-off-by: Sam Lucidi <[email protected]>
18a285f
to
6d8ef8e
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.
Great changes!
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jdubrick, mansam, thepetk 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 |
What does this PR do?
The Zap library provides a logger config that can be used without pulling in controller-runtime as a dependency. Since alizer is only using a few options, the dependency on controller-runtime can be avoided by setting it up directly using zap's NewDevelopmentConfig (which sets the development flag and the ISO8601 time encoder), and setting the log level on that.
(this scratches an itch for me as the k8s dependency is complicating some of my builds)
Which issue(s) does this PR fix
devfile/api#1581
PR acceptance criteria
Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened.
Unit/Functional tests
Documentation
How to test changes / Special notes to the reviewer
I did a visual inspection of the log output to check that the format appears to be the same.