mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-21 21:57:19 +00:00
Added debug log type
This commit is contained in:
parent
d303a859a8
commit
0a92b677b2
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue