Log stack trace lines separately to retain formatting

This commit is contained in:
Jason Bosco 2021-01-30 13:26:37 -08:00
parent 60799111be
commit 4e8b6613dc

View File

@ -4189,7 +4189,12 @@ private:
Printer printer;
printer.address = true;
//printer.print(st, stderr);
printer.print(st, LOG(ERROR));
std::stringstream error_lines;
printer.print(st, error_lines);
for(std::string line; std::getline(error_lines, line);) {
LOG(ERROR) << line;
}
#if _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
psiginfo(info, nullptr);