Always print events

Before this change, events were only printed if they had all the
fields (same behavior as with sysdig when the output format doesn't have
a leading "*"). With this change, all events are printed; those that
don't have all fields are prefixed with a notification.
This commit is contained in:
Henri DF
2016-02-23 18:15:43 -08:00
parent 2f105932fa
commit 3e73f01472

View File

@@ -121,11 +121,13 @@ captureinfo do_inspect(sinsp* inspector,
throw sinsp_exception("Error: No formatter for event with id %d " + to_string(ev->get_check_id()));
}
if(formatter->tostring(ev, &line))
{
bool has_all = formatter->tostring(ev, &line);
if (!has_all) {
cout << "(missing fields) ";
}
cout << line;
cout << endl;
}
}