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:
parent
5a8eb6704a
commit
a891f3f578
1 changed files with 4 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue