The bundle provide a Zap integration to GoZix application.
go get github.com/gozix/zap/v3
time_encoder config can be ("iso8601", "millis", "nanos") and only for "console" and "json" encoding
{
"zap": {
"cores": {
"console": {
"type": "stream",
"level": "debug",
"encoding": "console",
"message_key": "message",
"time_encoder": "iso8601"
},
"json": {
"type": "stream",
"level": "debug",
"encoding": "json",
"message_key": "message",
"time_encoder": "millis"
}
},
"caller": true,
"fields": [{
"key": "team",
"value": "any team name"
}, {
"key": "service",
"value": "any service name"
}],
"stacktrace": "error",
"development": true
}
}
Name | Description |
---|---|
AsCoreFactory | Add an factory |
You can find documentation on pkg.go.dev and read source code if needed.
If you have any questions, feel free to create an issue.