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

feat: expose context to debug logger #797

Merged
merged 3 commits into from
May 14, 2024

Conversation

torkelrogstad
Copy link
Contributor

Implementation of my feature request from #796

@jackwotherspoon
Copy link
Collaborator

Thanks for the PR @torkelrogstad! Will take a look shortly 😄

Copy link
Collaborator

@jackwotherspoon jackwotherspoon left a comment

Choose a reason for hiding this comment

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

Overall, LGTM. I'll let @enocom also review as he implemented the original debug logging feature.

options.go Outdated Show resolved Hide resolved
@jackwotherspoon jackwotherspoon added the tests: run Label to trigger Github Action tests. label May 14, 2024
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label May 14, 2024
Copy link
Member

@enocom enocom left a comment

Choose a reason for hiding this comment

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

One minor nit on wording. Otherwise, this looks great. Thanks for this change.

debug/debug.go Outdated
// Logger is the interface used for debug logging. By default, it is unused.
//
// Deprecated: use ContextLogger instead.
Copy link
Member

Choose a reason for hiding this comment

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

Let's say "Prefer ContextLogger" or similar. We'll keep letting people use Logger if they want.

enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request May 14, 2024
Callers may now provide a context to correlate logs with trace IDs in
their implementation of the interface.

This is a port of GoogleCloudPlatform/cloud-sql-go-connector#797
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request May 14, 2024
Callers may now provide a context to correlate logs with trace IDs in
their implementation of the interface.

This is a port of GoogleCloudPlatform/cloud-sql-go-connector#797
debug/debug.go Outdated Show resolved Hide resolved
@enocom enocom enabled auto-merge (squash) May 14, 2024 16:25
@jackwotherspoon jackwotherspoon added the tests: run Label to trigger Github Action tests. label May 14, 2024
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label May 14, 2024
@enocom enocom merged commit 847f7c1 into GoogleCloudPlatform:main May 14, 2024
19 checks passed
enocom added a commit to GoogleCloudPlatform/alloydb-go-connector that referenced this pull request May 14, 2024
Callers may now provide a context to correlate logs with trace IDs in
their implementation of the interface.

This is a port of GoogleCloudPlatform/cloud-sql-go-connector#797
@torkelrogstad
Copy link
Contributor Author

Thanks for the quick merge!

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.

None yet

3 participants