Skip to content

Commit

Permalink
Improve crash handling and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Dec 21, 2023
1 parent a9fa579 commit 27d13ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Monal/Classes/HelperTools.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ static void crash_callback(const KSCrashReportWriter* writer)
int copyRetval = asyncSafeCopyFile(_origLogfilePath, _logfilePath);
writer->addStringElement(writer, "logfileCopied", "YES");
writer->addIntegerElement(writer, "logfileCopyResult", copyRetval);
writer->addIntegerElement(writer, "logfileCopyErrno", errno);
addFilePathWithSize(writer, "logfileCopy", _logfilePath);
//this comes last to make sure we see size differences if the logfile got written during crash data collection (could be other processes)
addFilePathWithSize(writer, "currentLogfile", _origLogfilePath);
Expand Down Expand Up @@ -280,7 +281,6 @@ +(void) __attribute__((noreturn)) handleRustPanicWithText:(NSString*) text andBa
_crash_info.message = abort_msg.UTF8String;
_crash_info.signature = abort_msg.UTF8String; //use signature for apple crash reporter which does not handle message field
_crash_info.backtrace = backtrace.UTF8String;
_crash_info.message2 = backtrace.UTF8String; //use message2 for kscrash which does not handle backtrace field

//log error and flush all logs
[DDLog flushLog];
Expand Down

0 comments on commit 27d13ed

Please sign in to comment.