27 lines
607 B
Java
Raw Normal View History

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