Android Open Source - UniversalImagePick Log Util






From Project

Back to project page UniversalImagePick.

License

The source code is released under:

Apache License

If you think the Android project UniversalImagePick 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 com.luffyjet.universalimagepick.utils;
/*  w  w  w  .  jav  a 2s.  c  o m*/
import com.luffyjet.universalimagepick.BuildConfig;

import android.util.Log;

/**
 * Log util
 * @author Luffyjet
 * @version 1.0.0 
 * @since 2014-9-15
 * {@link https://github.com/luffyjet}
 */
public class LogUtil
{
  public static final int i = 0;
  public static final int e = 1;
  public static final int w = 2;
  public static final int d = 3;
  public static final int v = 4;

  /**
   * Tag = debug
   * @param log
   */
  public static void showLog(String log)
  {
    showLog(i, "debug", log);
  };

  /**
   * default info level
   * @param tag
   * @param log
   */
  public static void showLog(String tag, String log)
  {
    showLog(i, tag, log);
  };

  /**
   * 
   * @param level 
   * @param tag    tag
   * @param log    
   */
  public static void showLog(int level, String tag, String log)
  {
    if (BuildConfig.DEBUG)
    {
      switch (level)
      {
        case e:
          Log.e(tag, log);
          break;

        case i:
          Log.i(tag, log);
          break;

        case w:
          Log.w(tag, log);
          break;

        case d:
          Log.d(tag, log);
          break;

        case v:
          Log.v(tag, log);
          break;
        default:
          break;
      }
    }
  }
  
  /**
   * info
   * @param tag
   * @param string
   */
  public static void i(String tag, String string)
  {
    showLog(i, tag ,string);
  };

  /**
   * error
   * @param tag
   * @param string
   */
  public static void e(String tag, String string)
  {
    showLog(e, tag ,string);
  };
  
  /**
   * debug
   * @param tag
   * @param string
   */
  public static void d(String tag, String string)
  {
    showLog(d, tag ,string);
  };

  /**
   * 
   * @param tag
   * @param string
   */
  public static void w(String tag, String string)
  {
    showLog(w, tag ,string);
  };
  
  /**
   * 
   * @param tag
   * @param string
   */
  public static void v(String tag, String string)
  {
    showLog(v, tag ,string);
  };
}




Java Source Code List

com.luffyjet.universalimagepick.App.java
com.luffyjet.universalimagepick.Constants.java
com.luffyjet.universalimagepick.MainActivity.java
com.luffyjet.universalimagepick.Test.java
com.luffyjet.universalimagepick.adapter.BucketAdapter.java
com.luffyjet.universalimagepick.adapter.GalleryAdapter.java
com.luffyjet.universalimagepick.adapter.PickGridAdapter.java
com.luffyjet.universalimagepick.adapter.PreviewAdapter.java
com.luffyjet.universalimagepick.adapter.ResultAdapter.java
com.luffyjet.universalimagepick.model.ImageBucket.java
com.luffyjet.universalimagepick.model.Image.java
com.luffyjet.universalimagepick.model.ImagesHelper.java
com.luffyjet.universalimagepick.model.Thumbnail.java
com.luffyjet.universalimagepick.ui.BaseActivity.java
com.luffyjet.universalimagepick.ui.GalleryActivity.java
com.luffyjet.universalimagepick.ui.PickActivity.java
com.luffyjet.universalimagepick.utils.LogUtil.java
com.luffyjet.universalimagepick.widget.CropImageView.java
com.luffyjet.universalimagepick.widget.CustomGridView.java
com.luffyjet.universalimagepick.widget.MulitPointTouchListener.java
com.luffyjet.universalimagepick.widget.ViewfinderView.java