Keep boolean when listed in json_string_fields (#6400)

This commit is contained in:
Greg 2019-09-16 17:30:34 -06:00 committed by Daniel Nelson
parent acb6cd67be
commit df288a0bb4
1 changed files with 1 additions and 3 deletions

View File

@ -169,13 +169,11 @@ func (p *Parser) switchFieldToTag(tags map[string]string, fields map[string]inte
//remove any additional string/bool values from fields
for fk := range fields {
switch fields[fk].(type) {
case string:
case string, bool:
if p.stringFields != nil && p.stringFields.Match(fk) {
continue
}
delete(fields, fk)
case bool:
delete(fields, fk)
}
}
return tags, fields