thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Add uncaught exception handler to flush log to file

Open kewisch opened this issue 8 months ago • 3 comments

Add uncaught exception handler in case of a crash, to flush persistent logging if enabled

kewisch avatar May 09 '25 10:05 kewisch

@kewisch On further review I don't think this is actually necessary for the Sync Debug epic. Because we are writing to an internal file instead of to the debug log the file contents are preserved even through a crash. Now, if we think there is an issue with syncing that might crash the app but not be caught by the current sync tooling this may be helpful but I'm not sure thats an expected use case

asoucar avatar May 27 '25 19:05 asoucar

Is there some sort of I/O buffer that would be lost of a crash occurs? I think we should prepare for the fact that there may be future cases where a crash occurs with syncing, and I suspect this type of debug tooling will be useful not only for sync type crashes.

kewisch avatar May 28 '25 10:05 kewisch

I will check if the BufferedWriter needs to be flushed

asoucar avatar May 30 '25 20:05 asoucar