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
map[string]string
Currently fields doesn't support map[string]string.
Example:
package main import ( "os" "github.com/rs/zerolog" ) func main() { fields := map[string]string{ "bar": "baz", "n": "1", } log := zerolog.New(os.Stdout) log.Log(). Str("foo", "bar"). Fields(fields). Msg("hello world") }
results in:
{"foo":"bar","message":"hello world"}
whilst:
package main import ( "os" "github.com/rs/zerolog" ) func main() { fields := map[string]interface{}{ "bar": "baz", "n": "1", } log := zerolog.New(os.Stdout) log.Log(). Str("foo", "bar"). Fields(fields). Msg("hello world") }
outputs:
{"foo":"bar","bar":"baz","n":"1","message":"hello world"}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently fields doesn't support
map[string]string
.Example:
results in:
{"foo":"bar","message":"hello world"}
whilst:
outputs:
{"foo":"bar","bar":"baz","n":"1","message":"hello world"}
The text was updated successfully, but these errors were encountered: