return -EINVAL;
}
- if (field_nr++ != 0)
- fprintf(pos->fp, ", ");
if (pos->print_names)
fprintf(pos->fp, "timestamp = ");
else
if (!pos->print_names)
fprintf(pos->fp, "]");
- if (field_nr++ != 0)
+ if (pos->print_names)
fprintf(pos->fp, ", ");
+ else
+ fprintf(pos->fp, " ");
if (pos->print_names)
fprintf(pos->fp, "name = ");
- fprintf(pos->fp, "%s: ", g_quark_to_string(event_class->name));
+ fprintf(pos->fp, "%s", g_quark_to_string(event_class->name));
+ if (pos->print_names)
+ field_nr++;
+ else
+ fprintf(pos->fp, ": ");
if (stream_class->event_header) {
if (field_nr++ != 0)
fprintf(pos->fp, ", ");
if (pos->print_names)
fprintf(pos->fp, "stream.event.context = ");
- fprintf(pos->fp, " ");
ret = generic_rw(ppos, &stream_class->event_context->p);
if (ret)
goto error;
fprintf(pos->fp, ", ");
if (pos->print_names)
fprintf(pos->fp, "event.context = ");
- fprintf(pos->fp, " ");
ret = generic_rw(ppos, &event_class->context->p);
if (ret)
goto error;
fprintf(pos->fp, ", ");
if (pos->print_names)
fprintf(pos->fp, "event.fields = ");
- fprintf(pos->fp, " ");
ret = generic_rw(ppos, &event_class->fields->p);
if (ret)
goto error;