kv filter: support escaped quotes

Description

According to @whack

With the following config:

1 2 3 4 5 6 7 input { stdin { } } filter { kv { } } output { stdout { codec => 'json_lines' } }

The following message:

1 foo="bar \"baz\""

Should create the following output:

1 {"message":"foo=\"bar \\\"baz\\\"\"","@version":"1","@timestamp":"1969-01-01T01:01:01.000Z","host":"host.example.net","foo":"bar \"baz\""}

But instead creates the following output:

1 {"message":"foo=\"bar \\\"baz\\\"\"","@version":"1","@timestamp":"1969-01-01T01:01:01.000Z","host":"host.example.net","foo":"bar \\"}

Environment

None

Status

Assignee

Aaron Mildenstein

Reporter

Joseph Holsten

Labels

None

Affects versions

1.4.0

Priority