uber-go/fx

Slog adapter for fx

Closed this issue · 4 comments

Is your feature request related to a problem? Please describe.
As per go 1.21 we have slog package. I would want convenience of using my slog logger in fx without creating an adapter.

Describe the solution you'd like
A clear and concise description of what you want to happen.
I want fx to have a slog adapter

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Creating my wrapper over slog and implementing all the methods like this repo with 0 stars, but I don't want to do that.

Is this a breaking change?
We do not accept breaking changes to the existing API. Please consider if your proposed solution is backwards compatible. If not, we can help you make it backwards compatible, but this must be considered when we consider new features.

It's just an addition, so it would be totally backwards compatible

Additional context
Add any other context or screenshots about the feature request here.

@Friedrich42 its pretty cool that you found my repo 😄 . With the advent of go 1.22 there isn't a reason why slog support shouldn't be added (until 1.22 was released fx still supported 1.20 which only had slog via the exp package).

Assuming the maintainers are happy with what I have, we will hopefully have slog support soon!

@robbert229
Thank you for your contribution!
Once it's part of the fx, I'll be using your code heavily C:

@Friedrich42 You can close this issue as the latest release of fx has Slog support! Hurrah!

Thank you so much!