From d9e0883316d119fb484c677f27ba24f31baded72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 29 Apr 2026 11:20:06 +0200 Subject: [PATCH] sd-json: stop printing debug messages about extension fields The intent was good, but we now print two or three of those messages for each report metrics received on the wire. If the json object is extensible, then it's all good and we don't need to inundate the user with this trivial information. (And the message also sounds like something is wrong or unexpected, when it totally isn't.) ... (string):1:73: Unrecognized object field 'object', assuming extension. (string):1:89: Unrecognized object field 'value', assuming extension. json-stream: Received message: {"parameters":{"name":"io.systemd.Network.CarrierState","object":"virbr0","value":"degraded-carrier"},"continues":true} (string):1:66: Unrecognized object field 'object', assuming extension. (string):1:83: Unrecognized object field 'value', assuming extension. json-stream: Received message: {"parameters":{"name":"io.systemd.Network.CarrierState","object":"lo","value":"carrier"},"continues":true} (string):1:66: Unrecognized object field 'object', assuming extension. (string):1:79: Unrecognized object field 'value', assuming extension. json-stream: Received message: {"parameters":{"name":"io.systemd.Network.CarrierState","object":"wlp0s20f3","value":"carrier"},"continues":true} (string):1:66: Unrecognized object field 'object', assuming extension. (string):1:86: Unrecognized object field 'value', assuming extension. ... --- src/libsystemd/sd-json/sd-json.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libsystemd/sd-json/sd-json.c b/src/libsystemd/sd-json/sd-json.c index 4c541275c4..fbc2e55d23 100644 --- a/src/libsystemd/sd-json/sd-json.c +++ b/src/libsystemd/sd-json/sd-json.c @@ -5294,10 +5294,8 @@ _public_ int sd_json_dispatch_full( done++; } else { - if (flags & SD_JSON_ALLOW_EXTENSIONS) { - json_log(value, flags|SD_JSON_DEBUG, 0, "Unrecognized object field '%s', assuming extension.", sd_json_variant_string(key)); + if (flags & SD_JSON_ALLOW_EXTENSIONS) continue; - } json_log(value, flags, 0, "Unexpected object field '%s'.", sd_json_variant_string(key)); if (flags & SD_JSON_PERMISSIVE)