fix(engine): correctly format json output in json_event

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
Jason Dellaluce 2022-01-10 14:23:42 +00:00 committed by poiana
parent f8f053c7fa
commit 6bf8f34d9f

View File

@ -1529,12 +1529,9 @@ void json_event_formatter::set_format(output_format of, const std::string &forma
bool json_event_formatter::tostring_withformat(gen_event *gevt, std::string &output, gen_event_formatter::output_format of) bool json_event_formatter::tostring_withformat(gen_event *gevt, std::string &output, gen_event_formatter::output_format of)
{ {
json_event *ev = static_cast<json_event *>(gevt); json_event *ev = static_cast<json_event *>(gevt);
std::string ret;
if(of == OF_JSON) if(of == OF_JSON)
{ {
ret = tojson(ev); output = tojson(ev);
return true; return true;
} }
else else