v0.3.0
This new release of Log adds support for log/slog
, and per-instance styles, and includes bug fixes. You can now use Log as a log/slog
handler in your applications. Log comes with its own JSON and Logfmt formatters, on the other hand, Slog uses different handlers for these formats.
Breaking Changes!
- Bump the minimum GoLang version to 1.19
- Change the default timestamp key from
ts
totime
to matchlog/slog
- Change the default level key from
lvl
tolevel
to matchlog/slog
ParseLevel()
now returns an error if parse failed to find a level in string- Default levels values changed to be increments of 4 i.e.
DebugLevel = -4, InfoLevel = 0, WarnLevel = 4, ...
- Global styles are replaced with
DefaultStyles()
andSetStyles()
Changelog
New Features
- 5155c4f: feat(logger): implement slog.Handler (@aymanbagabas)
- 588043a: feat: add slog tests (@aymanbagabas)
- 7e55b91: feat: compile for go1.20 and go1.21 (@aymanbagabas)
- bd09619: feat: set custom styles (#84) (@aymanbagabas)
Bug fixes
- 707eb77: fix: add emoji test (@aymanbagabas)
- 7472e59: fix: dry writeSpace (@aymanbagabas)
- 1231b7b: fix: lint (@aymanbagabas)
Dependency updates
- e5a733b: feat(deps): bump github.com/charmbracelet/lipgloss from 0.8.0 to 0.9.1 (#76) (@dependabot[bot])
Other work
- 5e84160: Handle Empty Messages (#82) (@dezren39)
- 85d52ab: doc: add slog support (@aymanbagabas)
- d96bea2: refactor!: return Error from ParseLevel (#83) (@dezren39)
- 283fdeb: refactor: match log/slog level values (@aymanbagabas)
- 9c25f94: refactor: rename files (@aymanbagabas)
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.