v0.2.0
BREAKING CHANGE
- Drop functional options.
- Introduce
log.NewWithOptions(io.Writer, log.Options)
andlog.Options{}
to create a new logger with custom options. - Add format methods to format the log message just like
fmt.Printf()
. - Add
log.WithPrefix(string)
that returns a new sub-logger with prefix. - Parse level from string
log.ParseLevel(string)
- Custom key/value styles.
- Caller source formatter.
- And a bunch of bug fixes.
Changelog
New Features
- ecd1551: feat(caller): add caller formatter (@aymanbagabas)
- 5315620: feat(examples): put examples in a separate module (@aymanbagabas)
- 2285bce: feat(log): add format methods (@aymanbagabas)
- 40c0aef: feat(log): set custom format keys (@aymanbagabas)
- 99fa380: feat(log): sub-logger with prefix (@aymanbagabas)
- 169c012: feat(styles): style certain keys (@aymanbagabas)
- 391e751: feat(text): style certain values (@aymanbagabas)
- a2100d4: feat(text): use lipgloss renderer (@aymanbagabas)
- baccac6: feat: parse level from string (#11) (@gozeloglu)
Bug fixes
- 632a426: fix(go): make log compliant with go1.15 (@aymanbagabas)
- cc3834d: fix(text): style multiline value before rendering (@aymanbagabas)
Dependency updates
- e6729aa: feat(deps): bump github.com/charmbracelet/lipgloss from 0.7.0 to 0.7.1 (@dependabot[bot])
- 6630e96: feat(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (@dependabot[bot])
Documentation updates
- 26aaaae: docs: add codecov & go report badges (@aymanbagabas)
- 5da9367: docs: add format methods (@aymanbagabas)
- 6b05768: docs: add light background gifs (@aymanbagabas)
- 65ede51: docs: add missing info level info to README (@meowgorithm)
- a9f75d2: docs: add styles section and examples (@aymanbagabas)
- 07a423f: docs: update gifys (@aymanbagabas)
- 9519a70: docs: update readme examples (@aymanbagabas)
- b6dcc9b: docs: update styles example (@aymanbagabas)
- 462efd0: docs: update sublogger gify (@aymanbagabas)
- 17a651c: docs: use picture tags (@aymanbagabas)
Other work
- 39de9ca: add batch and chocolate chips NV pairs (@tomdotorg)
- 761ad44: fix(text) escape value before rendering styles (#20) (@tombell)
- 395e398: ref(log): reduce struct props (@aymanbagabas)
- 010ab90: ref(log): use log options to initialize new loggers (@aymanbagabas)
- 685b3e2: revert: dark mode gifs (@maaslalani)
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.