From 52878161e4bbe77ba9e73c44bab03d16356e36f7 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Wed, 1 Mar 2023 15:14:35 +0000 Subject: [PATCH] add log tail to crash reports --- src/debug/CrashReporter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/debug/CrashReporter.cpp b/src/debug/CrashReporter.cpp index 683bd951..e9a51803 100644 --- a/src/debug/CrashReporter.cpp +++ b/src/debug/CrashReporter.cpp @@ -122,6 +122,10 @@ void CrashReporter::createAndSaveCrash(int sig) { free(btSymbols); + finalCrashReport += "\n\nLog tail:\n"; + + finalCrashReport += execAndGet(("cat \"" + Debug::logFile + "\" | tail -n 50").c_str()); + const auto HOME = getenv("HOME"); if (!HOME)