@@ -0,0 +1,2311 @@
+package me.lexjoy.utils;%0A%0Aimport java.lang.reflect.Method;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport me.lexjoy.utils.log.LogHandler;%0A%0Aimport android.util.Log;%0A%0Apublic class LogUtils %7B%0A%0A  public static final LogHandler DEFAULT_LOG_HANDLER;%0A%0A  public static void addLogHandler(LogHandler handler) %7B%0A    if (handler == null) %7B%0A      return;%0A    %7D%0A    sHandlerList.add(handler);%0A  %7D%0A%0A  public static void removeLogHandler(LogHandler handler) %7B%0A    if (handler == null) %7B%0A      return;%0A    %7D%0A    sHandlerList.remove(handler);%0A  %7D%0A%0A  public static void v(String tag, String message) %7B%0A    logMessage(%22v%22, tag, message);%0A  %7D%0A%0A  public static void i(String tag, String message) %7B%0A    logMessage(%22i%22, tag, message);%0A  %7D%0A%0A  public static void w(String tag, String message) %7B%0A    logMessage(%22w%22, tag, message);%0A  %7D%0A%0A  public static void d(String tag, String message) %7B%0A    logMessage(%22d%22, tag, message);%0A  %7D%0A%0A  public static void e(String tag, String message) %7B%0A    logMessage(%22e%22, tag, message);%0A  %7D%0A%0A  private static void logMessage(String method, String tag, String message) %7B%0A    for (LogHandler handler : sHandlerList) %7B%0A      ReflectUtils.execMethod(%0A          handler, findLogMethod(handler, method), tag, message);%0A    %7D%0A  %7D%0A%0A  private static Method findLogMethod(LogHandler handler, String name) %7B%0A    // assert handler != null;%0A    return ReflectUtils.fetchMethod(handler.getClass(), name, LOG_METHOD_PARAMTYPES);%0A  %7D%0A%0A  private LogUtils() %7B%7D%0A%0A  private static final List%3CLogHandler%3E sHandlerList;%0A%0A  private static final Class%3C?%3E%5B%5D LOG_METHOD_PARAMTYPES = %7BString.class, String.class%7D;%0A%0A  static %7B%0A    sHandlerList = new ArrayList%3CLogHandler%3E();%0A    DEFAULT_LOG_HANDLER = new LogcatLogHandler();%0A    sHandlerList.add(DEFAULT_LOG_HANDLER);%0A  %7D%0A%0A  private static class LogcatLogHandler implements LogHandler %7B%0A    @Override%0A    public void v(String tag, String message) %7B%0A      Log.v(tag, message);%0A    %7D%0A%0A    @Override%0A    public void i(String tag, String message) %7B%0A      Log.i(tag, message);%0A    %7D%0A%0A    @Override%0A    public void w(String tag, String message) %7B%0A      Log.w(tag, message);%0A    %7D%0A%0A    @Override%0A    public void d(String tag, String message) %7B%0A      Log.d(tag, message);%0A    %7D%0A%0A    @Override%0A    public void e(String tag, String message) %7B%0A      Log.e(tag, message);%0A    %7D%0A  %7D%0A%0A%7D%0A

Create LogUtils.java