From: Simeon Miteff Date: Wed, 28 Sep 2022 23:38:07 +0000 (+1000) Subject: profiling: Make rule_perf.log JSON output newline-delimited X-Git-Tag: suricata-7.0.0-rc1~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6673846481067bded4fba3bb00d927aee7d542bb;p=thirdparty%2Fsuricata.git profiling: Make rule_perf.log JSON output newline-delimited Adding a newline makes the output valid JSON when multiple sortings of the rules profile object are written to the log. --- diff --git a/src/util-profiling-rules.c b/src/util-profiling-rules.c index 2303a51326..c221de6901 100644 --- a/src/util-profiling-rules.c +++ b/src/util-profiling-rules.c @@ -340,7 +340,7 @@ static void DumpJson(FILE *fp, SCProfileSummary *summary, if (unlikely(js_s == NULL)) return; - fprintf(fp, "%s", js_s); + fprintf(fp, "%s\n", js_s); free(js_s); json_decref(js); }