Android Open Source - gm-httpengine-eclipse L O G






From Project

Back to project page gm-httpengine-eclipse.

License

The source code is released under:

MIT License

If you think the Android project gm-httpengine-eclipse listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.gemini.util;
//from w  ww  .ja  va 2 s .  co  m
import android.util.Log;
/***
 * Log Util
 * @author geminiwen
 *
 */
public class LOG {
  public static final boolean DEBUG = false;
  public static final int LEVEL_VERBONSE  = Log.VERBOSE;
  public static final int LEVEL_DEBUG    = Log.DEBUG;
  public static final int LEVEL_INFO    = Log.INFO;
  public static final int LEVEL_WARN    = Log.WARN;
  public static final int LEVEL_ERROR    = Log.ERROR;
  
  private static int level = LEVEL_VERBONSE;
  
  public static void setLevel(int level) {
    LOG.level = level;
    if( !DEBUG ) {
      LOG.level = LEVEL_ERROR + 1;
    }
  }

  public static void v(String tag, String msg) {
    if( level <= LEVEL_VERBONSE ) {
      Log.v(tag,msg);
    }
  }
  
  public static void d(String tag, String msg, Throwable t) {
    if( level <= LEVEL_DEBUG ) {
      Log.d(tag, msg, t);
    }
  }
  
  public static void d(String tag, String msg) {
    LOG.d(tag,msg,null);
  }
  
  public static void i(String tag, String msg, Throwable t) {
    if( level <= LEVEL_INFO ) {
      Log.i(tag,msg,t);
    }
  }
  
  public static void i(String tag, String msg) {
    LOG.i(tag,msg,null);
  }
  
  
  public static void w(String tag, String msg, Throwable t) {
    if( level <= LEVEL_WARN ) {
      Log.w(tag,msg,t);
    }
  }
  
  public static void w(String tag, String msg) {
    LOG.w(tag, msg);
  }
  
  public static void e(String tag, String msg, Throwable t) {
    if( level <= LEVEL_ERROR ) {
      Log.e(tag,msg,t);
    }
  }
  
  public static void e(String tag, String msg) {
    LOG.e(tag,msg,null);
  }
}




Java Source Code List

org.gemini.listener.OnProgressUpdateListener.java
org.gemini.listener.OnResponseListener.java
org.gemini.net.GMHttpEngine.java
org.gemini.net.GMHttpParameters.java
org.gemini.net.GMHttpRequest.java
org.gemini.net.GMHttpResponse.java
org.gemini.net.GMHttpService.java
org.gemini.net.GMNetStateManager.java
org.gemini.parser.DefaultHttpRequestParser.java
org.gemini.parser.HttpRequestParser.java
org.gemini.parser.HttpResponseParser.java
org.gemini.util.LOG.java