@@ -0,0 +1,2313 @@
+package com.meizhuo.etips.common.utils;%0D%0A%0D%0Aimport android.util.Log;%0D%0A/**%0D%0A * wrapper of Log , log easier!%3Cbr%3E%0D%0A * you can use %3Ch1%3EdisableLogging()%3Ch1%3E,no logs will be passed to LogCat, all log methods will do nothing%0D%0A * @author Jayin Ton%0D%0A *%0D%0A */%0D%0Apublic final class L %7B%0D%0A      //only Log pre-two%0D%0A%09 // private static final String LOG_FORMAT = %22%251$s%5Cn%252$s%22;%0D%0A%09  /** disable Logging **/%0D%0A      private static volatile boolean DISABLED = false;  %0D%0A      private static String TAG = %22debug%22;%0D%0A%0D%0A      private L() %7B%0D%0A      %7D%0D%0A%0D%0A      /** Enables logger (if %7B@link #disableLogging()%7D was called before) */%0D%0A      public static void enableLogging() %7B%0D%0A              DISABLED = false;%0D%0A      %7D%0D%0A%0D%0A      /** Disables logger, no logs will be passed to LogCat, all log methods will do nothing */%0D%0A      public static void disableLogging() %7B%0D%0A              DISABLED = true;%0D%0A      %7D%0D%0A%0D%0A      public static void d(String message) %7B%0D%0A              log(Log.DEBUG, null, message);%0D%0A      %7D%0D%0A%0D%0A      public static void i(String message) %7B%0D%0A              log(Log.INFO, null, message);%0D%0A      %7D%0D%0A%0D%0A      public static void w(String message) %7B%0D%0A              log(Log.WARN, null, message);%0D%0A      %7D%0D%0A%0D%0A      public static void e(Throwable ex) %7B%0D%0A              log(Log.ERROR, ex, null);%0D%0A      %7D%0D%0A%0D%0A      public static void e(String message) %7B%0D%0A              log(Log.ERROR, null, message);%0D%0A     %7D%0D%0A%0D%0A      public static void e(Throwable ex,String message) %7B%0D%0A              log(Log.ERROR, ex, message);%0D%0A      %7D%0D%0A      %0D%0A      private static final String LOG_FORMAT = %22%251$s%5Ct%5Cn%252$s%22;%0D%0A      %0D%0A      private static void log(int priority, Throwable ex, String message) %7B%0D%0A              if (DISABLED) return;%0D%0A              String log;%0D%0A              if (ex == null) %7B%0D%0A                      log = message;%0D%0A              %7D else %7B%0D%0A                      String logMessage = message == null ? ex.getMessage() : message;%0D%0A                      String logBody = Log.getStackTraceString(ex);%0D%0A                      log = String.format(LOG_FORMAT, logMessage, logBody);%0D%0A              %7D%0D%0A              StackTraceElement%5B%5D s = Thread.currentThread().getStackTrace();%0D%0A              Log.println(priority, TAG, s%5Bs.length-1%5D.getClassName()+%22:%22+s%5Bs.length-1%5D.getMethodName()+%22()%22);%0D%0A              Log.println(priority, TAG, log);%0D%0A      %7D%0D%0A%0D%0A%7D%0D%0A

add log tool -L