mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 20:06:29 +01:00
Added debug log type
This commit is contained in:
@@ -64,7 +64,7 @@ public class EntityLog {
|
||||
@NonNull
|
||||
public String data;
|
||||
|
||||
enum Type {General, Statistics, Scheduling, Network, Account, Protocol, Classification, Notification, Rules}
|
||||
enum Type {General, Statistics, Scheduling, Network, Account, Protocol, Classification, Notification, Rules, Debug}
|
||||
|
||||
private static final ExecutorService executor =
|
||||
Helper.getBackgroundExecutor(1, "log");
|
||||
@@ -111,6 +111,9 @@ public class EntityLog {
|
||||
|
||||
if (context == null)
|
||||
return;
|
||||
if (type == Type.Debug &&
|
||||
!(BuildConfig.DEBUG || BuildConfig.TEST_RELEASE))
|
||||
return;
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean main_log = prefs.getBoolean("main_log", true);
|
||||
@@ -220,6 +223,8 @@ public class EntityLog {
|
||||
return ContextCompat.getColor(context, R.color.solarizedBlue);
|
||||
case Rules:
|
||||
return ContextCompat.getColor(context, R.color.solarizedCyan);
|
||||
case Debug:
|
||||
return Helper.resolveColor(context, R.attr.colorWarning);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user