Have prefixFieldClashes respect the JSON FieldMap
Currently, it will fix clashes that don't exist and miss clashes that do exist due to field remapping. Fixes #708
This commit is contained in:
+2
-1
@@ -20,6 +20,7 @@ const (
|
||||
|
||||
var (
|
||||
baseTimestamp time.Time
|
||||
emptyFieldMap FieldMap
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -82,7 +83,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
||||
b = &bytes.Buffer{}
|
||||
}
|
||||
|
||||
prefixFieldClashes(entry.Data)
|
||||
prefixFieldClashes(entry.Data, emptyFieldMap)
|
||||
|
||||
f.Do(func() { f.init(entry) })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user