FairEmail/app/src/main/java/eu/faircode/email/Log.java

36 lines
1.0 KiB
Java
Raw Normal View History

2018-12-24 12:27:45 +00:00
package eu.faircode.email;
public class Log {
static final String TAG = "fairemail";
public static int i(String msg) {
2018-12-28 09:56:40 +00:00
if (BuildConfig.BETA_RELEASE)
return android.util.Log.i(TAG, msg);
else
return 0;
2018-12-24 12:27:45 +00:00
}
public static int w(String msg) {
return android.util.Log.w(TAG, msg);
}
public static int e(String msg) {
return android.util.Log.e(TAG, msg);
}
public static int w(Throwable ex) {
return android.util.Log.w(TAG, ex + "\n" + android.util.Log.getStackTraceString(ex));
}
public static int e(Throwable ex) {
return android.util.Log.e(TAG, ex + "\n" + android.util.Log.getStackTraceString(ex));
}
public static int w(String prefix, Throwable ex) {
return android.util.Log.w(TAG, prefix + " " + ex + "\n" + android.util.Log.getStackTraceString(ex));
}
public static int e(String prefix, Throwable ex) {
return android.util.Log.e(TAG, prefix + " " + ex + "\n" + android.util.Log.getStackTraceString(ex));
}
}