-
Notifications
You must be signed in to change notification settings - Fork 100
Replace slog with zap for global logging #1459
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
Conversation
18da781
to
3873e01
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.
hey, @rvarun11, thanks for addressing the feedback, really appreciate it 🙌
Left a few small suggestions, but other than that it's ready to be merged 🚀
* Switch from slog to uber-go/zap SugaredLogger for better performance * Add *w functions (Debugw, Infow, etc.) for structured key-value logging * Add DPanic and Fatal log levels with corresponding *f/*w variants * Maintain structured/unstructured log switching via UNSTRUCTURED_LOGS * Preserve debug flag integration for log level control * Use go-logr/zapr for NewLogr() Kubernetes logr.Logger compatibility
Co-authored-by: Radoslav Dimitrov <radoslav@stacklok.com>
Co-authored-by: Radoslav Dimitrov <radoslav@stacklok.com>
Co-authored-by: Radoslav Dimitrov <radoslav@stacklok.com>
Co-authored-by: Radoslav Dimitrov <radoslav@stacklok.com>
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.
@rvarun11 - Much appreciated! 🙌
Thanks @rdimitrov! Will be monitoring now just to make sure everything is working as expected and just in case anything comes up, please feel free to ping me on Discord. |
Closes #383
Based on the feedback received in #1362, this PR:
UNSTRUCTURED_LOGS
env varIt also:
Optionally, we can consider updating the
logger.Initialize()
toinit()
.