chore(example): use the current logger API in the standalone example - #110
Merged
Conversation
The standalone example still constructed its logger with
log.NewBeautifulLogger, which go-utils v1.3.0 keeps working as a deprecated
shim. An example is the wrong place to demonstrate a deprecated constructor, so
it now uses log.New(log.Config{Name: "authsome"}).
Behaviour is the same either way. The comment records what that behaviour is,
since it is no longer implied by the constructor's name: the format is chosen
from the output, a terminal getting aligned coloured columns and anything else
JSON, with FORGE_LOG_FORMAT overriding both.
One line plus its comment. This is the last piece of the go-utils v1.3.0
adoption; the version bumps are already on main via 2ceff13.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The standalone example still constructs its logger with
log.NewBeautifulLogger, which go-utils v1.3.0 keeps working as a deprecatedshim. An example is the wrong place to demonstrate a deprecated constructor.
Behaviour is identical. The added comment records what that behaviour is, since
it is no longer implied by the constructor's name: the format is chosen from the
output, a terminal getting aligned coloured columns and anything else JSON, with
FORGE_LOG_FORMAToverriding both.One line plus its comment. This is the last piece of the go-utils v1.3.0
adoption — the version bumps are already on
mainvia2ceff13, and #108 wasclosed as stale once those landed.
Heads up:
ci / Lintis red onmain, unrelated to thisgolangci-lintreports 6 findings on currentmain, none of them in_examples. Verified by stashing this change and re-running: the same 6 appear.They came in with
c472f0b fix: fixed the client refresh, after #109 clearedthe retention findings. Happy to fix them in a follow-up in the same shape as
#109 — say the word.