-
Notifications
You must be signed in to change notification settings - Fork 993
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
fix:Resolve deprecation warning for klogr.New in Metrics Server #5794
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Guo Peng <370090914@qq.com>
/run-e2e internal |
Signed-off-by: Guo Peng <370090914@qq.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.
Could you please update docs for logs if there are any changes? https://github.com/kedacore/keda/blob/main/BUILD.md#setting-log-levels
@@ -60,6 +60,9 @@ spec: | |||
- --logtostderr=true | |||
- --stderrthreshold=ERROR | |||
- --v=0 | |||
- --zap-log-level=info |
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.
why is this needed?
// | ||
//nolint:staticcheck // SA1019: klogr.New is deprecated. | ||
var logger = klogr.New().WithName("keda_metrics_adapter") | ||
var setupLog = ctrl.Log.WithName("keda_metrics_adapter") |
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.
I understand that klogr.New is deprecated, but I was wondering if there's a specific reason for introducing setupLog instead of reusing logger variable?
Would it be possible to update the code to consistently use logger without introducing setupLog?
Metrics Server: klogr.New is deprecated use textlogger.NewLogger instead
Checklist
Fixes #5732
Relates to #