From 5d12eed17ee7a5ad8ce4610d3d54ad9fa4039763 Mon Sep 17 00:00:00 2001 From: Timothy Stack Date: Fri, 13 May 2016 20:06:40 -0700 Subject: [PATCH] fix a bug related to hide-extra for json logs --- src/log_format.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/log_format.cc b/src/log_format.cc index 9b7bdfc6..8a4d68fe 100644 --- a/src/log_format.cc +++ b/src/log_format.cc @@ -999,10 +999,10 @@ static int read_json_field(yajlpp_parse_context *ypc, const unsigned char *str, json_field_cmp(external_log_format::JLF_VARIABLE, field_name)) == line_format.end()) { jlu->jlu_sub_line_count += 1; - } - for (size_t lpc = 0; lpc < len; lpc++) { - if (str[lpc] == '\n') { - jlu->jlu_sub_line_count += 1; + for (size_t lpc = 0; lpc < len; lpc++) { + if (str[lpc] == '\n') { + jlu->jlu_sub_line_count += 1; + } } } }