-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: add init log option for velero controller-runtime manager. #4341
Fix: add init log option for velero controller-runtime manager. #4341
Conversation
0d86285
to
dacaa20
Compare
fix for issue vmware-tanzu#3737 add log option for velero controller-runtime manager to log return error in reconcile loop. Signed-off-by: Xun Jiang jxun@vmware.com Signed-off-by: jxun <jxun@jxun-a01.vmware.com>
dacaa20
to
4a1943f
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.
In general, LGTM
But it's better to have a changelog if it's fixing an issue.
@jenting |
fix for issue vmware-tanzu#3737 add log option for velero controller-runtime manager to log return error in reconcile loop. Signed-off-by: Xun Jiang jxun@vmware.com Signed-off-by: Xun Jiang <jxun@vmware.com>
d2e85bb
to
7b89950
Compare
fix for issue vmware-tanzu#3737 add log option for velero controller-runtime manager to log return error in reconcile loop. Signed-off-by: Xun Jiang jxun@vmware.com Signed-off-by: Xun Jiang <jxun@vmware.com>
@blackpiglet Could we try to address the issues mentioned here? If we simply set a |
I checked whether it's possible to use logrus logger, but it seems the manager only takes logger implements the github.com/go-logr/logr interface. logrus and logr's interface are not compatible. |
@blackpiglet check out "github.com/bombsimon/logrusr" -- it allows you to implement the go-logr logr.Logger interface with a logrus logger. |
@blackpiglet For the openshift velero plugin used with OADP, we needed to call a shared func that was used both in the plugin (which uses velero's logrus implementation) and in the crane migration tool (which uses go-logr Loggers). This line calls The func we're calling there takes a |
@sseago |
logrusr is a open source convertor, which can convert logrus logger into logr. By using logrusr, velero can use exsiting formatted logrus logger, other than introducing zap as a new logger. Signed-off-by: Xun Jiang <jxun@vmware.com>
@blackpiglet And one thing we need to do is to remove the similar code like this which will output duplicated logs after we set logger for the controller. We can do this during the controller refactoring from kubebuilder v2 to v3, but please open a new issue for this if you don't include the change in this PR |
@ywk253100 |
Remove duplicated log entries, which are introduced by logger added in controller manager in pull request vmware-tanzu#4341. Signed-off-by: Xun Jiang <jxun@vmware.com>
Remove duplicated log entries, which are introduced by logger added in controller manager in pull request vmware-tanzu#4341. fix issue vmware-tanzu#4368 Signed-off-by: Xun Jiang <jxun@vmware.com>
Signed-off-by: Xun Jiang jxun@vmware.com
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #3737
Please indicate you've done the following:
/kind changelog-not-required
.site/content/docs/main
.