-
Notifications
You must be signed in to change notification settings - Fork 651
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
Migrate to controller-runtime logger #2048
Comments
Could I work on this task? |
@champon1020 Sure, Feel free to assign yourself with a |
/assign |
Sorry for the late action but I'm going to tackle this issue. The logger, which is initialized by calling ctrl.SetLogger, can be referred by
So, I think we should pass the logger and attach key-values instead of returning new logger in the LoggerForXXX functions of commonutil pacakge. func LoggerForUnstructured(logger logr.Logger, *metav1unstructured.Unstructured, kind string) logr.Logger {
return logger.WithValues(...)
} Also, Please let me know your opinions. (cc: @tenzen-y) |
Currently, the training-operator uses some types of logger like this:
training-operator/pkg/util/logger.go
Line 85 in c204220
training-operator/cmd/training-operator.v1/main.go
Line 111 in c204220
So, based on this discussion, I'd like to suggest using the controller-runtime logger everywhere to increase maintainability and consistency.
The text was updated successfully, but these errors were encountered: