|
|
@@ -10,16 +10,51 @@ import com.miekir.common.BuildConfig;
|
|
|
* @author Miekir
|
|
|
* @date 2020/11/19 9:19
|
|
|
* Description:
|
|
|
- * todo 完善
|
|
|
*/
|
|
|
public class LogTool {
|
|
|
+ private static final String TAG = "LogTool";
|
|
|
private static final int RETURN_DEFAULT = -1;
|
|
|
private LogTool() {}
|
|
|
|
|
|
+ public static int i(String tag, String message) {
|
|
|
+ if (BuildConfig.IS_DEBUG) {
|
|
|
+ return Log.i(tag, message);
|
|
|
+ }
|
|
|
+ return RETURN_DEFAULT;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static int i(String message) {
|
|
|
+ if (BuildConfig.IS_DEBUG) {
|
|
|
+ return Log.i(TAG, message);
|
|
|
+ }
|
|
|
+ return RETURN_DEFAULT;
|
|
|
+ }
|
|
|
+
|
|
|
public static int d(String tag, String message) {
|
|
|
if (BuildConfig.IS_DEBUG) {
|
|
|
return Log.d(tag, message);
|
|
|
}
|
|
|
return RETURN_DEFAULT;
|
|
|
}
|
|
|
+
|
|
|
+ public static int d(String message) {
|
|
|
+ if (BuildConfig.IS_DEBUG) {
|
|
|
+ return Log.d(TAG, message);
|
|
|
+ }
|
|
|
+ return RETURN_DEFAULT;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static int e(String tag, String message) {
|
|
|
+ if (BuildConfig.IS_DEBUG) {
|
|
|
+ return Log.e(tag, message);
|
|
|
+ }
|
|
|
+ return RETURN_DEFAULT;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static int e(String message) {
|
|
|
+ if (BuildConfig.IS_DEBUG) {
|
|
|
+ return Log.e(TAG, message);
|
|
|
+ }
|
|
|
+ return RETURN_DEFAULT;
|
|
|
+ }
|
|
|
}
|