3 ms·
Well, I see the awkwardness of emitting a log like that, but it's not any worse than emitting a single JSON array and waiting for that closing ']'. Both can be
by planede 4y ago
Well, I see the awkwardness of emitting a log like that, but it's not any worse than emitting a single JSON array and waiting for that closing ']'.
Both can be emitted and parsed in a streaming fashion though, but I wouldn't say that either XML or JSON is suitable for logs. Maybe NDJSON, but it's more like a hack around this limitation.
- kzrdude 4y agofor json it's common to have multiple records per file. Then it's just one object per line, for example.
- planede 4y agoYes, that's NDJSON, as in newline delimited JSON. http://ndjson.org/ http://ndjson.org/
- jraph 4y ago> but I wouldn't say that either XML or JSON is suitable for logs Of course. Better use a binary format for this. https://systemd.io/JOURNAL_FILE_FORMAT/ https://systemd.io/JOURNAL_FILE_FORMAT/ :-)