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