Closed aymanbagabas closed 1 year ago
Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.
Thanks for integrating Codecov - We've got you covered :open_umbrella:
👋 Was looking for bridging with slog
. Any update?
@owenthereal I believe we're just waiting for slog to be merged into the language as the API may change in the meantime. https://github.com/golang/go/issues/56345 (I think that's the right issue iirc)
Will be quick to merge once that's all up to date!
Now that 1.21 released log/slog
, is it possible to make this lib compatible ? It looks very pretty, better than the default slog TextHandler
Is there anything I can do to help get #74 merged in with this / with this PR released?
Is there anything I can do to help get #74 merged in with this / with this PR released?
Hi @jamietanna,
Thanks for working on #74. It would be awesome to make it use exp/slog
on versions prior to go1.21. You could do so with the //go:build !go1.21
build tag
Ooh interesting!
Sure thing, I was thinking of only supporting as early as Go 1.20, as it's the earliest version of Go that the Go team support, but happy to add exp/slog
, that's a good idea if we want to support old versions :raised_hands:
Thanks for carrying on with this I'd remembered yesterday I needed to get back to my PR, but appreciate you doing it 🙌🏽
It looks like it might be a breaking change though, as the JSON keys for some fields changed.
Yes, that's correct, there will be breaking changes in the next release
Uses x/exp/slog for go1.19 and go1.20 and log/slog for >go1.21. Upgrades the minimum go version to go1.19
Example:
Output:
Fixes: https://github.com/charmbracelet/log/issues/8