app/src/main/java/com/hdl/photovoltaic/other/HdlLogLogic.java
@@ -7,8 +7,19 @@ */ public class HdlLogLogic { /** * 是否需要打印(true不需要打印) */ public static boolean isDebug = false; private static volatile HdlLogLogic sHdlLogLogic; /** * 获取当前对象 * * @return HdlLogLogic */ public static synchronized HdlLogLogic getInstance() { if (sHdlLogLogic == null) { synchronized (HdlLogLogic.class) { @@ -21,11 +32,17 @@ } public static void print(String tag, String mgs) { if (isDebug) { return; } Log.d(tag, mgs); } public static void print(String mgs) { if (isDebug) { return; } System.out.println(mgs); } }