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

use context to create new loggers #184

Merged

Conversation

KPostOffice
Copy link
Contributor

Issue link

project-codeflare/codeflare-operator#113

What changes have been made

Use the controller runtime logger everywhere with structured logging. The logger is generated based on the current context object. In the linked issue there is talk about using .WithName but I'm unsure if this is necessary.

Verification steps

Run controller and see new structured logs.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@astefanutti
Copy link
Contributor

/lgtm

controllers/machinepools.go Outdated Show resolved Hide resolved
controllers/machinepools.go Outdated Show resolved Hide resolved
@KPostOffice KPostOffice force-pushed the context_logger branch 2 times, most recently from cb865c1 to 98517cf Compare December 4, 2023 16:54
@VanillaSpoon
Copy link
Contributor

/lgtm thanks @KPostOffice :)

@astefanutti
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 5, 2023
@astefanutti
Copy link
Contributor

/approve

Copy link

openshift-ci bot commented Dec 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: astefanutti

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Dec 5, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit fafee56 into project-codeflare:main Dec 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants