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

core: Add ctx.Slogger() which returns an slog logger #5945

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

francislavoie
Copy link
Member

This should allow modules that want to use slog APIs instead of zap to do so easily. We take care of setting up the logger name using the module ID.

This requires Go 1.21 so I put it in a separate file. Once we bump our minimum we can merge it back into context.go.

@francislavoie francislavoie added the feature ⚙️ New feature or request label Nov 17, 2023
@francislavoie francislavoie added this to the v2.9.0 milestone Nov 17, 2023
@francislavoie francislavoie modified the milestones: v2.9.0, v2.8.0 Jan 14, 2024
@mholt
Copy link
Member

mholt commented Jan 24, 2024

Oh this is good, thanks.

Since we're going to bump up to Go 1.21 soon, do we want to remove the build tag and possibly even just put this into an existing file?

@francislavoie
Copy link
Member Author

francislavoie commented Jan 24, 2024

Sure, can wait until we merge that (version bump)

@francislavoie
Copy link
Member Author

Okay, done @mholt

@francislavoie francislavoie enabled auto-merge (squash) January 25, 2024 19:09
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

Cool, let's try it out.

@francislavoie francislavoie merged commit e1b9a9d into master Jan 25, 2024
25 checks passed
@francislavoie francislavoie deleted the slog-interop branch January 25, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants