From 1b58382eae6cbb214c99738446cae21f935f7416 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 15 Dec 2023 14:53:57 +0100 Subject: [PATCH] format_json: only log errors when a `yajl_gen_` call fails. --- src/utils/format_json/open_telemetry.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/format_json/open_telemetry.c b/src/utils/format_json/open_telemetry.c index e4f83b97c..1f02628c1 100644 --- a/src/utils/format_json/open_telemetry.c +++ b/src/utils/format_json/open_telemetry.c @@ -34,7 +34,9 @@ do { \ int status = (f); \ if (status != 0) { \ - ERROR("format_json: %s failed with status %d", #f, status); \ + if (strncmp(#f, "yajl_gen_", strlen("yajl_gen_")) == 0) { \ + ERROR("format_json: %s failed with status %d", #f, status); \ + } \ return status; \ } \ } while (0) -- 2.39.5