Magisk/app/src/main/java/com/topjohnwu/magisk/utils/Logger.java

27 lines
607 B
Java
Raw Normal View History

2019-01-30 08:10:12 +00:00
package com.topjohnwu.magisk.utils;
2016-09-21 21:55:20 +00:00
import android.util.Log;
2019-03-08 15:19:22 +00:00
import com.topjohnwu.magisk.BuildConfig;
2019-01-30 08:10:12 +00:00
import com.topjohnwu.magisk.Const;
2018-07-04 10:11:57 +00:00
2017-05-31 09:43:55 +00:00
public class Logger {
2016-09-21 21:55:20 +00:00
2017-07-15 17:20:39 +00:00
public static void debug(String line) {
2018-07-04 10:11:57 +00:00
if (BuildConfig.DEBUG)
Log.d(Const.DEBUG_TAG, "DEBUG: " + line);
2017-07-15 17:20:39 +00:00
}
2017-05-31 09:43:55 +00:00
public static void debug(String fmt, Object... args) {
2018-07-04 10:11:57 +00:00
debug(Utils.fmt(fmt, args));
2017-07-15 17:20:39 +00:00
}
public static void error(String line) {
2017-11-05 20:41:23 +00:00
Log.e(Const.DEBUG_TAG, "ERROR: " + line);
2016-12-23 15:05:41 +00:00
}
2017-05-31 09:43:55 +00:00
public static void error(String fmt, Object... args) {
2018-07-04 10:11:57 +00:00
error(Utils.fmt(fmt, args));
2017-07-15 17:20:39 +00:00
}
2016-09-21 21:55:20 +00:00
}