MCPcopy Create free account
hub / github.com/M66B/FairEmail / Log

Class Log

app/src/main/java/eu/faircode/email/Log.java:95–1921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93import javax.net.ssl.TrustManagerFactory;
94
95public class Log {
96 private static Context ctx;
97
98 private static final int MAX_CRASH_REPORTS = (Log.isTestRelease() ? 50 : 5);
99 private static final String TAG = "fairemail";
100
101 static final String TOKEN_REFRESH_REQUIRED =
102 "Token refresh required. Is there a VPN based app running?";
103
104 static final List<String> IGNORE_CLASSES = Collections.unmodifiableList(Arrays.asList(
105 "com.sun.mail.util.MailConnectException",
106
107 "android.accounts.AuthenticatorException",
108 "android.accounts.OperationCanceledException",
109 "android.app.RemoteServiceException",
110
111 "java.lang.NoClassDefFoundError",
112 "java.lang.UnsatisfiedLinkError",
113
114 "java.nio.charset.MalformedInputException",
115
116 "java.net.ConnectException",
117 "java.net.SocketException",
118 "java.net.SocketTimeoutException",
119 "java.net.UnknownHostException",
120 "java.lang.InterruptedException",
121
122 "javax.mail.AuthenticationFailedException",
123 "javax.mail.internet.AddressException",
124 "javax.mail.internet.ParseException",
125 "javax.mail.MessageRemovedException",
126 "javax.mail.FolderNotFoundException",
127 "javax.mail.ReadOnlyFolderException",
128 "javax.mail.FolderClosedException",
129 "com.sun.mail.util.FolderClosedIOException",
130 "javax.mail.StoreClosedException",
131
132 "org.xmlpull.v1.XmlPullParserException"
133 ));
134
135 static {
136 System.loadLibrary("fairemail");
137 }
138
139 public static native void jni_set_log_level(int level);
140
141 public static native long[] jni_safe_runtime_stats();
142
143 public static int d(String msg) {
144 return d(TAG, msg);
145 }
146
147 public static int d(String tag, String msg) {
148 org.tinylog.Logger.tag(tag).debug(msg);
149 return 0;
150 }
151
152 public static int i(String msg) {

Callers

nothing calls this directly

Calls 1

isTestReleaseMethod · 0.95

Tested by

no test coverage detected