diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 28ce3a1ea1..048f176c4a 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -3846,7 +3846,7 @@ class Core { modified = (force || initialize != 0 || folder.modseq == null || !folder.modseq.equals(modseq)); EntityLog.log(context, - BuildConfig.DEBUG ? EntityLog.Type.Debug3 : EntityLog.Type.General, + BuildConfig.DEBUG ? EntityLog.Type.Debug4 : EntityLog.Type.General, folder.name + " modseq=" + modseq + "/" + folder.modseq + " force=" + force + " init=" + (initialize != 0) + " modified=" + modified); } @@ -4354,7 +4354,7 @@ class Core { // Update modseq folder.modseq = modseq; EntityLog.log(context, - BuildConfig.DEBUG ? EntityLog.Type.Debug3 : EntityLog.Type.General, + BuildConfig.DEBUG ? EntityLog.Type.Debug4 : EntityLog.Type.General, folder.name + " set modseq=" + modseq); db.folder().setFolderModSeq(folder.id, folder.modseq); diff --git a/app/src/main/java/eu/faircode/email/EntityLog.java b/app/src/main/java/eu/faircode/email/EntityLog.java index ad398d8ac3..dcd6a3b60f 100644 --- a/app/src/main/java/eu/faircode/email/EntityLog.java +++ b/app/src/main/java/eu/faircode/email/EntityLog.java @@ -65,7 +65,7 @@ public class EntityLog { @NonNull public String data; - public enum Type {General, Statistics, Scheduling, Network, Account, Protocol, Classification, Notification, Rules, Cloud, Debug1, Debug2, Debug3} + public enum Type {General, Statistics, Scheduling, Network, Account, Protocol, Classification, Notification, Rules, Cloud, Debug1, Debug2, Debug3, Debug4, Debug5} public static void log(final Context context, String data) { log(context, Type.General, data); @@ -109,7 +109,7 @@ public class EntityLog { if (context == null) return; - if ((type == Type.Debug1 || type == Type.Debug2 || type == Type.Debug3) && + if ((type == Type.Debug1 || type == Type.Debug2 || type == Type.Debug3 || type == Type.Debug4 || type == Type.Debug5) && !(BuildConfig.DEBUG || Log.isTestRelease())) return; @@ -239,6 +239,10 @@ public class EntityLog { return ContextCompat.getColor(context, R.color.solarizedGreen); case Debug3: return ContextCompat.getColor(context, R.color.solarizedBlue); + case Debug4: + return ContextCompat.getColor(context, R.color.solarizedOrange); + case Debug5: + return ContextCompat.getColor(context, R.color.solarizedYellow); default: return null; } diff --git a/app/src/main/java/eu/faircode/email/FragmentLogs.java b/app/src/main/java/eu/faircode/email/FragmentLogs.java index 6d6d41ca99..e1d253efc7 100644 --- a/app/src/main/java/eu/faircode/email/FragmentLogs.java +++ b/app/src/main/java/eu/faircode/email/FragmentLogs.java @@ -204,7 +204,7 @@ public class FragmentLogs extends FragmentBase { int len = EntityLog.Type.values().length; if (!BuildConfig.DEBUG) - len -= 3; + len -= 5; SpannableStringBuilder[] titles = new SpannableStringBuilder[len]; boolean[] states = new boolean[len]; diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index f9e629ce02..caad678c85 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -2660,7 +2660,7 @@ public class MessageHelper { int keylen = modulus.bitLength(); Log.i("DKIM RSA pubkey length=" + keylen); if (keylen < DKIM_MIN_KEY_LENGTH) { - EntityLog.log(context, EntityLog.Type.Debug3, "DKIM RSA pubkey length=" + keylen); + EntityLog.log(context, EntityLog.Type.Debug5, "DKIM RSA pubkey length=" + keylen); throw new IllegalArgumentException("DKIM RSA pubkey length " + keylen + " < " + DKIM_MIN_KEY_LENGTH); } @@ -2669,7 +2669,7 @@ public class MessageHelper { for (int prime = 3; prime <= 65537; prime += 2) if (isPrime(prime) && modulus.remainder(BigInteger.valueOf(prime)).compareTo(BigInteger.ZERO) == 0) { - EntityLog.log(context, EntityLog.Type.Debug3, "DKIM RSA pubkey with small prime=" + prime); + EntityLog.log(context, EntityLog.Type.Debug5, "DKIM RSA pubkey with small prime=" + prime); throw new IllegalArgumentException("DKIM RSA pubkey with small prime=" + prime); } Log.i("DKIM RSA okay");