]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
json: log about the right line number
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Mar 2019 17:11:35 +0000 (18:11 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 5 Mar 2019 20:10:57 +0000 (21:10 +0100)
We mean the line number in the json data, not the line number in our
C source code.

Addresses: https://github.com/systemd/systemd/pull/9762#issuecomment-441183987

src/shared/json.c

index f46ea682042751d3d9f869400b69b74f4c093ac5..2a858d4cc4fcc5c2a2b6d29bd4e8e235eff87b51 100644 (file)
@@ -3164,7 +3164,7 @@ int json_log_internal(
                                 "CONFIG_FILE=%s", source,
                                 "CONFIG_LINE=%u", source_line,
                                 "CONFIG_COLUMN=%u", source_column,
-                                LOG_MESSAGE("%s:%u: %s", source, line, buffer),
+                                LOG_MESSAGE("%s:%u:%u: %s", source, source_line, source_column, buffer),
                                 NULL);
         else
                 return log_struct_internal(