From: Lennart Poettering Date: Wed, 18 Feb 2026 14:48:46 +0000 (+0100) Subject: report: use JSON-SEQ when outputing a series of json objects X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd961ea209ba5eaa25c3ebae8a10430a079d8edb;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/report/report.c b/src/report/report.c index 281491c577c..3c2f89e0029 100644 --- a/src/report/report.c +++ b/src/report/report.c @@ -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 {