-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLog.java
More file actions
32 lines (26 loc) · 866 Bytes
/
Copy pathLog.java
File metadata and controls
32 lines (26 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Created by yalerex on 2016/12/19.
*/
public class Log {
public static int logLevel = android.util.Log.VERBOSE;
public static void i(String tag, String msg) {
if (logLevel <= android.util.Log.INFO)
android.util.Log.i(tag, msg);
}
public static void e(String tag, String msg) {
if (logLevel <= android.util.Log.ERROR)
android.util.Log.e(tag, msg);
}
public static void d(String tag, String msg) {
if (logLevel <= android.util.Log.DEBUG)
android.util.Log.d(tag, msg);
}
public static void v(String tag, String msg) {
if (logLevel <= android.util.Log.VERBOSE)
android.util.Log.v(tag, msg);
}
public static void w(String tag, String msg) {
if (logLevel <= android.util.Log.WARN)
android.util.Log.w(tag, msg);
}
}