Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename WithTags, clarify docs #2

Merged
merged 3 commits into from
Jun 29, 2018

Conversation

DirectXMan12
Copy link
Contributor

This renames WithTags to WithValues (as per #1 (comment)), and removes the "tag" terminology
from the docs, in favor of "named values", with "key" referring to the name
of a value.

It also adds a note suggesting that certain keys (e.g. "error" or "msg") should be
avoided, and clarifies that negative log levels are forbidden.

This renames the WithTags method to WithValues, and removes the use of
the term "tag" from the documentation.  It's replaced with the phrase
"named values", and noted that "key" is used to refer to the name of a
particular value.
This notes that certain keys (e.g. "error" or "msg") are often used by
implementations to attach other information, and thus should generally
not be used.
Some underlying implementations attach special meaning to negative log
levels (e.g. Zap, where those become positive log levels, which
eventually indicate special behavior), so we forbid them.
@DirectXMan12 DirectXMan12 mentioned this pull request Jun 29, 2018
@thockin thockin merged commit 9fb12b3 into go-logr:master Jun 29, 2018
@DirectXMan12 DirectXMan12 deleted the refactor/withtags-rename branch June 30, 2018 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants