mirror of
https://github.com/tstack/lnav
synced 2024-11-01 21:40:34 +00:00
need to check level before incrementing line count
This commit is contained in:
parent
9e82c6ba32
commit
c0cd26dec4
@ -365,7 +365,10 @@ static int read_json_null(yajlpp_parse_context *ypc)
|
||||
json_log_userdata *jlu = (json_log_userdata *)ypc->ypc_userdata;
|
||||
const intern_string_t field_name = ypc->get_path();
|
||||
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(field_name);
|
||||
if (ypc->is_level(1)) {
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(
|
||||
field_name);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -375,7 +378,10 @@ static int read_json_bool(yajlpp_parse_context *ypc, int val)
|
||||
json_log_userdata *jlu = (json_log_userdata *)ypc->ypc_userdata;
|
||||
const intern_string_t field_name = ypc->get_path();
|
||||
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(field_name);
|
||||
if (ypc->is_level(1)) {
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(
|
||||
field_name);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -406,7 +412,10 @@ static int read_json_int(yajlpp_parse_context *ypc, long long val)
|
||||
}
|
||||
}
|
||||
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(field_name);
|
||||
if (ypc->is_level(1)) {
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(
|
||||
field_name);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -425,7 +434,10 @@ static int read_json_double(yajlpp_parse_context *ypc, double val)
|
||||
jlu->jlu_base_line->set_time(tv);
|
||||
}
|
||||
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(field_name);
|
||||
if (ypc->is_level(1)) {
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(
|
||||
field_name);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -939,7 +951,10 @@ static int read_json_field(yajlpp_parse_context *ypc, const unsigned char *str,
|
||||
jlu->jlu_base_line->set_opid(opid);
|
||||
}
|
||||
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(field_name, str, len);
|
||||
if (ypc->is_level(1)) {
|
||||
jlu->jlu_sub_line_count += jlu->jlu_format->value_line_count(field_name,
|
||||
str, len);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user