We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
At 2 places the %v macro is used with the logger and is not supported
%v
thanos/cmd/thanos/query.go
Line 559 in 46d0106
thanos/cmd/thanos/rule.go
Line 724 in 46d0106
What happened: Logs generates result in dynamic key with MISSING value. ex:
{"msg":"Duplicate store address is provided - %v","test":"(MISSING)"}
What you expected to happen: Json logging play well with ElasticSearch type mapping. No dynamic key with MISSING value is reported
Proposed fix Replace %v by string concatenation ex: logger.Log("msg", "Duplicate store address is provided - " + addr)
logger.Log("msg", "Duplicate store address is provided - " + addr)
The text was updated successfully, but these errors were encountered:
Thanks for catching this! Would you like to open a pr to fix it?
We can just change it to level.Warn(logger).Log("msg", "Duplicate store address is provided", "addr", addr).
level.Warn(logger).Log("msg", "Duplicate store address is provided", "addr", addr)
I am wondering if there is already a static linter for this.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
At 2 places the
%v
macro is used with the logger and is not supportedthanos/cmd/thanos/query.go
Line 559 in 46d0106
thanos/cmd/thanos/rule.go
Line 724 in 46d0106
What happened:
Logs generates result in dynamic key with MISSING value.
ex:
What you expected to happen:
Json logging play well with ElasticSearch type mapping. No dynamic key with MISSING value is reported
Proposed fix
Replace
%v
by string concatenationex:
logger.Log("msg", "Duplicate store address is provided - " + addr)
The text was updated successfully, but these errors were encountered: