From a69c9121878c3b2ec8eb8c94e5fdf61b6f5c8b11 Mon Sep 17 00:00:00 2001 From: "Thierry FOURNIER / OZON.IO" Date: Wed, 23 Nov 2016 01:13:57 +0100 Subject: [PATCH] CLEANUP: log-format: useless file and line in json converter The caller must log location information, so this information is provided two times in the log line. The error log is like this: [ALERT] 327/011513 (14291) : parsing [o3.conf:38]: 'http-response set-header': Sample fetch failed with : invalid args in conv method 'json' : Unexpected input code type at file 'o3.conf', line 38. Allowed value are 'ascii', 'utf8', 'utf8s', 'utf8p' and 'utf8ps'. This patch removes the second location indication, the the same error becomes: [ALERT] 327/011637 (14367) : parsing [o3.conf:38]: 'http-response set-header': Sample fetch failed with : invalid args in conv method 'json' : Unexpected input code type. Allowed value are 'ascii', 'utf8', 'utf8s', 'utf8p' and 'utf8ps'. --- src/sample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sample.c b/src/sample.c index 51e61836a..889ec0ca4 100644 --- a/src/sample.c +++ b/src/sample.c @@ -1693,8 +1693,8 @@ static int sample_conv_json_check(struct arg *arg, struct sample_conv *conv, return 1; } - memprintf(err, "Unexpected input code type at file '%s', line %d. " - "Allowed value are 'ascii', 'utf8', 'utf8s', 'utf8p' and 'utf8ps'", file, line); + memprintf(err, "Unexpected input code type. " + "Allowed value are 'ascii', 'utf8', 'utf8s', 'utf8p' and 'utf8ps'"); return 0; }