mirror of https://github.com/tstack/lnav.git
[bro-log] fix an issue with the logline_values in the bro log format
This commit is contained in:
parent
ee572a2c86
commit
90ab6ea8f1
|
@ -129,7 +129,7 @@ void field_overlay_source::build_summary_lines(const listview_curses &lv)
|
|||
}
|
||||
}
|
||||
|
||||
this->fos_summary_lines.push_back(attr_line_t());
|
||||
this->fos_summary_lines.emplace_back();
|
||||
attr_line_t &sum_line = this->fos_summary_lines.back();
|
||||
if (tss.empty()) {
|
||||
sum_line.with_ansi_string(
|
||||
|
|
|
@ -117,7 +117,7 @@ public:
|
|||
this->ldh_namer = std::make_unique<column_namer>();
|
||||
this->ldh_json_pairs.clear();
|
||||
|
||||
for (auto lv : this->ldh_line_values) {
|
||||
for (const auto& lv : this->ldh_line_values) {
|
||||
this->ldh_namer->cn_builtin_names.emplace_back(lv.lv_name.get());
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ static string scrub_rdns(const string &str)
|
|||
}
|
||||
|
||||
class generic_log_format : public log_format {
|
||||
static pcrepp &scrub_pattern(void)
|
||||
static pcrepp &scrub_pattern()
|
||||
{
|
||||
static pcrepp SCRUB_PATTERN(
|
||||
"\\d+-(\\d+-\\d+ \\d+:\\d+:\\d+(?:,\\d+)?:)\\w+:(.*)");
|
||||
|
@ -386,13 +386,13 @@ public:
|
|||
this->lf_time_ordered = false;
|
||||
};
|
||||
|
||||
const intern_string_t get_name(void) const {
|
||||
const intern_string_t get_name() const {
|
||||
static const intern_string_t name(intern_string::lookup("bro"));
|
||||
|
||||
return this->blf_format_name.empty() ? name : this->blf_format_name;
|
||||
};
|
||||
|
||||
virtual void clear(void) {
|
||||
virtual void clear() {
|
||||
this->log_format::clear();
|
||||
this->blf_format_name.clear();
|
||||
this->blf_field_defs.clear();
|
||||
|
@ -661,6 +661,7 @@ public:
|
|||
this);
|
||||
} else {
|
||||
values.emplace_back(fd.fd_name);
|
||||
values.back().lv_format = this;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -721,7 +722,7 @@ public:
|
|||
return retval;
|
||||
};
|
||||
|
||||
log_vtab_impl *get_vtab_impl(void) const {
|
||||
log_vtab_impl *get_vtab_impl() const {
|
||||
if (this->blf_format_name.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue