mirror of
https://github.com/systemd/systemd.git
synced 2026-08-12 12:16:06 +00:00
report: use JSON-SEQ when outputing a series of json objects
We do this in our other tools that output a large number of JSON objects in a potentially streamable way, hence do so here too.
This commit is contained in:
@@ -586,6 +586,9 @@ static int verb_metrics(int argc, char *argv[], void *userdata) {
|
||||
assert(argc >= 1);
|
||||
assert(argv);
|
||||
|
||||
/* Enable JSON-SEQ mode here, since we'll dump a large series of JSON objects */
|
||||
arg_json_format_flags |= SD_JSON_FORMAT_SEQ;
|
||||
|
||||
if (streq_ptr(argv[0], "metrics"))
|
||||
action = ACTION_LIST;
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user