fix: use Log.d for debugging (#66)

This commit is contained in:
TheJeterLP 2022-07-07 18:50:42 +02:00 committed by GitHub
parent f74a11523f
commit 605124bc60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 8 deletions

View File

@ -29,7 +29,7 @@ public class LithoAdRemoval {
try {
if (value == null || value.isEmpty() || !enabled) return false;
LogHelper.printException(LithoAdRemoval.class, "Searching for AD: " + value);
LogHelper.debug(LithoAdRemoval.class, "Searching for AD: " + value);
List<String> blockList = new ArrayList<>();
List<String> bufferBlockList = new ArrayList<>();

View File

@ -193,34 +193,28 @@ public enum SettingsEnum {
public int getInt() {
SettingsEnum.loadSettings();
if (value == null) value = -1;
LogHelper.debug(SettingsEnum.class, "Variable " + name() + " is " + value);
return (int) value;
}
public String getString() {
SettingsEnum.loadSettings();
LogHelper.debug(SettingsEnum.class, "Variable " + name() + " is " + value);
return (String) value;
}
public boolean getBoolean() {
SettingsEnum.loadSettings();
if (this != DEBUG_BOOLEAN)
LogHelper.debug(SettingsEnum.class, "Variable " + name() + " is " + value);
return (Boolean) value;
}
public Long getLong() {
SettingsEnum.loadSettings();
if (value == null) value = -1L;
LogHelper.debug(SettingsEnum.class, "Variable " + name() + " is " + value);
return (Long) value;
}
public Float getFloat() {
SettingsEnum.loadSettings();
if (value == null) value = -1.0f;
LogHelper.debug(SettingsEnum.class, "Variable " + name() + " is " + value);
return (Float) value;
}

View File

@ -11,7 +11,7 @@ public class LogHelper {
public static void debug(Class clazz, String message) {
if (SettingsEnum.DEBUG_BOOLEAN.getBoolean()) {
Log.e("ReVanced: " + (clazz != null ? clazz.getSimpleName() : ""), message);
Log.d("ReVanced: " + (clazz != null ? clazz.getSimpleName() : ""), message);
}
}