Skip to content
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

move logger to Reconciler struct #8

Merged
merged 2 commits into from
Dec 7, 2021
Merged

Conversation

rohantmp
Copy link
Contributor

@rohantmp rohantmp commented Dec 6, 2021

Passing the log to all nested called functions is cumbersome.
Since we only run one Reconcile() worker at a time, we can use a
struct level var.

Signed-off-by: Rohan CJ [email protected]

Passing the log to all nested called functions is cumbersome.
Since we only run one Reconcile() worker at a time, we can use a
struct level var.

Signed-off-by: Rohan CJ <[email protected]>
logger.Info("reconciling", "topolvmcluster", req)
result, err := r.reconcile(ctx, req, logger)
r.Log = log.FromContext(ctx).WithName(ControllerName)
r.Log.Info("reconciling", "topolvmcluster", req)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "lvmcluster"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

@nbalacha nbalacha merged commit de296e3 into openshift:main Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants