mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 19:35:10 +01:00
Added log types
This commit is contained in:
@@ -55,12 +55,24 @@ public class EntityLog {
|
||||
@NonNull
|
||||
public Long time;
|
||||
@NonNull
|
||||
public Integer type = LOG_GENERAL;
|
||||
@NonNull
|
||||
public String data;
|
||||
|
||||
static final int LOG_GENERAL = 0;
|
||||
static final int LOG_STATS = 1;
|
||||
static final int LOG_SCHEDULE = 2;
|
||||
static final int LOG_NETWORK = 3;
|
||||
static final int LOG_ACCOUNT = 4;
|
||||
|
||||
private static final ExecutorService executor =
|
||||
Helper.getBackgroundExecutor(1, "log");
|
||||
|
||||
static void log(final Context context, String data) {
|
||||
log(context, LOG_GENERAL, data);
|
||||
}
|
||||
|
||||
static void log(final Context context, int type, String data) {
|
||||
Log.i(data);
|
||||
|
||||
if (context == null)
|
||||
@@ -73,6 +85,7 @@ public class EntityLog {
|
||||
|
||||
final EntityLog entry = new EntityLog();
|
||||
entry.time = new Date().getTime();
|
||||
entry.type = type;
|
||||
entry.data = data;
|
||||
|
||||
final DB db = DB.getInstance(context);
|
||||
|
||||
Reference in New Issue
Block a user