Commit ea75c0f9 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Add option to Log.java to disable logs

parent 1ac1a481
......@@ -32,14 +32,16 @@ public final class Log {
public static String TAG = "Linphone";
private static final boolean useIsLoggable = false;
private static boolean isLogEnabled = true;
public Log(String tag) {
public Log(String tag, boolean enable) {
TAG = tag;
isLogEnabled = enable;
}
@SuppressWarnings(value="all")
private static boolean isLoggable(int level) {
return !useIsLoggable || android.util.Log.isLoggable(TAG, level);
return isLogEnabled && (!useIsLoggable || android.util.Log.isLoggable(TAG, level));
}
public static void i(Object...objects) {
......@@ -113,3 +115,4 @@ public final class Log {
return sb.toString();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment