mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-28 20:17:38 +00:00
Get rid of error logs
This commit is contained in:
parent
316ec98e0f
commit
c78896a335
@ -118,11 +118,8 @@ public class UpdateRepos extends ParallelTask<Void, Void, Void> {
|
||||
mm.repoDB.addRepo(repo);
|
||||
publishProgress();
|
||||
}
|
||||
if (!id.equals(repo.getId())) {
|
||||
Logger.error("Repo [" + name + "] rid=[" + id + "] id=[" + repo.getId() + "] mismatch");
|
||||
}
|
||||
} catch (Repo.IllegalRepoException e) {
|
||||
Logger.error(e.getMessage());
|
||||
Logger.debug(e.getMessage());
|
||||
mm.repoDB.removeRepo(id);
|
||||
}
|
||||
});
|
||||
@ -205,7 +202,7 @@ public class UpdateRepos extends ParallelTask<Void, Void, Void> {
|
||||
repo.update();
|
||||
mm.repoDB.addRepo(repo);
|
||||
} catch (Repo.IllegalRepoException e) {
|
||||
Logger.error(e.getMessage());
|
||||
Logger.debug(e.getMessage());
|
||||
mm.repoDB.removeRepo(repo);
|
||||
}
|
||||
});
|
||||
|
@ -44,7 +44,7 @@ public class Repo extends BaseModule {
|
||||
throw new IllegalRepoException("Repo [" + repoName + "] does not contain versionCode");
|
||||
}
|
||||
if (getMinMagiskVersion() < Const.MIN_MODULE_VER()) {
|
||||
Logger.error("Repo [" + repoName + "] is outdated");
|
||||
Logger.debug("Repo [" + repoName + "] is outdated");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,18 +2,19 @@ package com.topjohnwu.magisk.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.topjohnwu.magisk.BuildConfig;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class Logger {
|
||||
|
||||
private static final boolean SHELL_LOGGING = false;
|
||||
|
||||
public static void debug(String line) {
|
||||
Log.d(Const.DEBUG_TAG, "DEBUG: " + line);
|
||||
if (BuildConfig.DEBUG)
|
||||
Log.d(Const.DEBUG_TAG, "DEBUG: " + line);
|
||||
}
|
||||
|
||||
public static void debug(String fmt, Object... args) {
|
||||
debug(String.format(Locale.US, fmt, args));
|
||||
debug(Utils.fmt(fmt, args));
|
||||
}
|
||||
|
||||
public static void error(String line) {
|
||||
@ -21,16 +22,6 @@ public class Logger {
|
||||
}
|
||||
|
||||
public static void error(String fmt, Object... args) {
|
||||
error(String.format(Locale.US, fmt, args));
|
||||
}
|
||||
|
||||
public static void shell(boolean in, String line) {
|
||||
if (SHELL_LOGGING) {
|
||||
Log.d(Const.DEBUG_TAG, (in ? "SHELLIN : " : "SHELLOUT: ") + line);
|
||||
}
|
||||
}
|
||||
|
||||
public static void shell(boolean in, String fmt, Object... args) {
|
||||
shell(in, String.format(Locale.US, fmt, args));
|
||||
error(Utils.fmt(fmt, args));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user