Log Exporter
The log exporter is here mostly for backward compatibility (originally every variation were logged, but it can be a lot of data for a default configuration).
It will use your logger ffclient.Config.Logger
to log every variation changes.
You can configure your output log with the Format
field.
It uses a go template format.
Configuration example
ffclient.Config{
// ...
DataExporter: ffclient.DataExporter{
Exporter: &logsexporter.Exporter{
LogFormat: "[{{ .FormattedDate}}] user=\"{{ .UserKey}}\", flag=\"{{ .Key}}\", value=\"{{ .Value}}\"",
},
},
// ...
}
Configuration fields
Field | Description |
---|---|
LogFormat | (optional) LogFormat is the template configuration of the output format of your log. You can use all the key from the exporter.FeatureEvent + a key called FormattedDate that represents the date with the RFC 3339 Format.Default: [{{ .FormattedDate}}] user="{{ .UserKey}}", flag="{{ .Key}}", value="{{ .Value}}" |
Check the godoc for full details.