Begin crash log for SIGABRT with error message and timestamp

This makes the format more similar to what the uncaught C++ and SEH
exception handlers write. Previously there was no indication in the
crash log that a SIGABRT happened.
This commit is contained in:
Julian Brost 2020-10-21 16:21:14 +02:00
parent f084cdecbe
commit 710cd7287f
1 changed files with 4 additions and 0 deletions

View File

@ -758,6 +758,10 @@ void Application::SigAbrtHandler(int)
Log(LogCritical, "Application")
<< "Icinga 2 has terminated unexpectedly. Additional information can be found in '" << fname << "'" << "\n";
ofs << "Caught SIGABRT." << "\n"
<< "Current time: " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", Utility::GetTime()) << "\n"
<< "\n";
DisplayInfoMessage(ofs);
ofs << "\nStacktrace:\n" << boost::stacktrace::stacktrace() << "\n";