Logstash quote escape bug


(Kyi) #1

Hi guys,
I think logstash quote escaping has a bug.

I do this

mutate {
add_field => { "foo" => 'string with " and ' chars' }
add_field => { "bar" => "string with " and ' chars" }
}

I output the result to file with json_lines codec. I expect this:

"foo":"string with " and ' chars","bar":"string with " and ' chars"

But, the actual output is this

"foo":"string with " and \' chars","bar":"string with \" and ' chars"


(Kyi) #2

It's quote silly that backlash escape character becomes part of the string! It is a catch22!


(Mark Walkom) #3

Please don't post multiple topics on the same problem, see Quote escaping bug in logstash configs


(Mark Walkom) #4