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

Karina/bcda 7415 ctx logger #151

Closed
wants to merge 35 commits into from
Closed

Conversation

karinamzalez
Copy link
Contributor

🎫 Ticket

https://jira.cms.gov/browse/BCDA-7415

🛠 Changes

(What was added, updated, or removed in this PR.)

ℹ️ Context for reviewers

(Background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers.)

✅ Acceptance Validation

(How were the changes verified? Did you fully test the acceptance criteria in the ticket? Provide reproducible testing instructions and screenshots if applicable.)

🔒 Security Implications

  • This PR adds a new software dependency or dependencies.
  • This PR modifies or invalidates one or more of our security controls.
  • This PR stores or transmits data that was not stored or transmitted before.
  • This PR requires additional review of its security implications for other reasons.

If any security implications apply, add Jason Ashbaugh (GitHub username: StewGoin) as a reviewer and do not merge this PR without his approval.

"fmt"
"net/http"
"os"

"github.com/CMSgov/bcda-ssas-app/ssas"
"github.com/CMSgov/bcda-app/log"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an import for the bcda-app; should this be referencing another package in the SSAS-app where the context logger lives?

go.mod Outdated Show resolved Hide resolved
@laurenkrugen-navapbc
Copy link
Contributor

I think there are a couple of things that might need to be updated:

  1. when calling log.GetCtxLogger(context.Background()), GetCtxLogger is expecting context that will have a key value pair, specifically one of the type CtxLoggerKey. I would expect that passing in a new context.Background() will result in nil reference errors, so we should probably update those to utilize the request context!
  2. For some areas of the codebase where there is not a request context, such as startup functions like init(). It may be necessary to use the global logger for those places: log.Logger.

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