public final class Log extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
Log.IPrintlnLog
提供给外部的实现
|
static interface |
Log.LogLevelId
日志级别的标识
|
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEBUG
|
static String |
DEBUG_TEXT
|
static int |
ERROR
|
static String |
ERROR_TEXT
|
static int |
INFO
|
static String |
INFO_TEXT
|
static int |
VERBOSE
|
static String |
VERBOSE_TEXT
|
static int |
WARN
|
static String |
WARN_TEXT
|
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
d(String tag,
String msg)
发送一条
DEBUG 级别的日志消息 |
static int |
d(String tag,
String msg,
Throwable tr)
发送一条
DEBUG 级别的日志消息 |
static int |
e(String tag,
String msg)
发送一条
ERROR 级别的日志消息 |
static int |
e(String tag,
String msg,
Throwable tr)
发送一条
ERROR 级别的日志消息 |
static String |
getStackTraceString(Throwable tr)
获取可记录的堆栈跟踪
|
static int |
i(String tag,
String msg)
发送一条
INFO 级别的日志消息 |
static int |
i(String tag,
String msg,
Throwable tr)
发送一条
INFO 级别的日志消息 |
static int |
println(int priority,
String tag,
String msg)
打印一行日志消息
|
static void |
setPrintlnLogImpl(Log.IPrintlnLog printlnLogImpl)
设置打印日志的实现
|
static int |
v(String tag,
String msg)
发送一条
VERBOSE 级别的日志消息 |
static int |
v(String tag,
String msg,
Throwable tr)
发送一条
VERBOSE 级别的日志消息 |
static int |
w(String tag,
String msg)
发送一条
WARN 级别的日志消息 |
static int |
w(String tag,
String msg,
Throwable tr)
发送一条
VERBOSE 级别的日志消息 |
static int |
w(String tag,
Throwable tr)
发送一条
WARN 级别的日志消息 |
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 int v(String tag, String msg, Throwable tr)
VERBOSE 级别的日志消息tag - 标签msg - 日志消息tr - 异常信息public static int d(String tag, String msg, Throwable tr)
DEBUG 级别的日志消息tag - 标签msg - 日志消息tr - 异常信息public static int i(String tag, String msg, Throwable tr)
INFO 级别的日志消息tag - 标签msg - 日志消息tr - 异常信息public static int w(String tag, String msg, Throwable tr)
VERBOSE 级别的日志消息tag - 标签msg - 日志消息tr - 异常信息public static int e(String tag, String msg, Throwable tr)
ERROR 级别的日志消息tag - 标签msg - 日志消息tr - 异常信息public static String getStackTraceString(Throwable tr)
tr - 异常信息public static void setPrintlnLogImpl(Log.IPrintlnLog printlnLogImpl)
printlnLogImpl - 实现类Copyright © 2021. All rights reserved.