1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-04 18:48:31 +00:00

Append to crash log and include version and date/time

This commit is contained in:
M66B 2018-12-19 12:51:27 +01:00
parent 5a8eb6704a
commit a891f3f578

View file

@ -32,6 +32,7 @@ import android.util.Log;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Date;
public class ApplicationEx extends Application {
private Thread.UncaughtExceptionHandler prev = null;
@ -119,8 +120,9 @@ public class ApplicationEx extends Application {
FileWriter out = null;
try {
out = new FileWriter(file);
out.write(ex + "\r\n" + Log.getStackTraceString(ex));
out = new FileWriter(file, true);
out.write(BuildConfig.VERSION_NAME + " " + new Date() + "\r\n");
out.write(ex + "\r\n" + Log.getStackTraceString(ex) + "\r\n");
} catch (IOException e) {
Log.e(Helper.TAG, e + "\n" + Log.getStackTraceString(e));
} finally {