[log_formats] ignore empty lines in non-multiline formats

This commit is contained in:
Timothy Stack 2020-12-06 13:09:06 -08:00
parent 623da1fe33
commit a0986bf271
2 changed files with 7 additions and 1 deletions

View File

@ -904,6 +904,10 @@ void external_log_format::annotate(uint64_t line_number, shared_buffer_ref &line
return;
}
if (line.empty()) {
return;
}
int pat_index = this->pattern_index_for_line(line_number);
pattern &pat = *this->elf_pattern_order[pat_index];

View File

@ -73,7 +73,9 @@ public:
return *this;
};
bool empty() const { return this->sb_data == nullptr; };
bool empty() const {
return this->sb_data == nullptr || this->sb_length == 0;
};
const char *get_data() const { return this->sb_data; };