public class LogUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
ASSERT
Priority constant for the println method.use Log.wtf.
|
static int |
DEBUG
Priority constant for the println method; use Log.d.
|
static int |
ERROR
Priority constant for the println method; use Log.e.
|
static int |
INFO
Priority constant for the println method; use Log.i.
|
static int |
PRINTLN
Priority constant for the println method;use System.out.println
|
static String |
TAG |
static String |
TAG_FORMAT |
static int |
VERBOSE
Priority constant for the println method; use Log.v.
|
static String |
VERTICAL |
static int |
WARN
Priority constant for the println method; use Log.w.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
d(String msg)
Log.d
|
static void |
d(String msg,
Throwable t) |
static void |
d(Throwable t) |
static void |
e(String msg)
Log.e
|
static void |
e(String msg,
Throwable t) |
static void |
e(Throwable t) |
static int |
getPriority() |
static StackTraceElement |
getStackTraceElement(int n)
获取堆栈
|
static void |
i(String msg)
Log.i
|
static void |
i(String msg,
Throwable t) |
static void |
i(Throwable t) |
static boolean |
isShowLog() |
static void |
print(Object obj) |
static void |
print(String msg)
System.out.print
|
static void |
printf(String msg)
System.out.printf
|
static void |
println(Object obj) |
static void |
println(String msg)
System.out.println
|
static void |
setPriority(int priority) |
static void |
setShowLog(boolean isShowLog) |
static void |
v(String msg)
Log.v
|
static void |
v(String msg,
Throwable t) |
static void |
v(Throwable t) |
static void |
w(String msg)
Log.w
|
static void |
w(String msg,
Throwable t) |
static void |
w(Throwable t) |
static void |
wtf(String msg)
Log.wtf
|
static void |
wtf(String msg,
Throwable t) |
static void |
wtf(Throwable t) |
public static final int PRINTLN
public static final int VERBOSE
public static final int DEBUG
public static final int INFO
public static final int WARN
public static final int ERROR
public static final int ASSERT
public static void setShowLog(boolean isShowLog)
public static boolean isShowLog()
public static int getPriority()
public static void setPriority(int priority)
public static StackTraceElement getStackTraceElement(int n)
n - n=0 VMStack
n=1 Thread
n=3 CurrentStack
n=4 CallerStack
...public static void v(String msg)
msg - public static void v(Throwable t)
public static void d(String msg)
msg - public static void d(Throwable t)
public static void i(String msg)
msg - public static void i(Throwable t)
public static void w(String msg)
msg - public static void w(Throwable t)
public static void e(String msg)
msg - public static void e(Throwable t)
public static void wtf(String msg)
msg - public static void wtf(Throwable t)
public static void print(String msg)
msg - public static void print(Object obj)
public static void printf(String msg)
msg - public static void println(String msg)
msg - public static void println(Object obj)