Skip to content

Commit

Permalink
Modify the log level.
Browse files Browse the repository at this point in the history
  • Loading branch information
sinyu890807 committed Aug 29, 2014
1 parent fc2803a commit 21c3c0e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions library/src/org/litepal/util/LogUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,23 @@
import android.util.Log;

public final class LogUtil {


public static final int DEBUG = 2;

public static final int ERROR = 5;

public static final int LEVEL = ERROR;

public static void d(String tagName, String message) {
Log.d(tagName, message);
if (LEVEL >= DEBUG) {
Log.d(tagName, message);
}
}

public static void e(String tagName, Exception e){
e.printStackTrace();
if (LEVEL >= ERROR) {
Log.e(tagName, e.getMessage(), e);
}
}

}
}

0 comments on commit 21c3c0e

Please sign in to comment.