public class LoggerTextView
extends AppCompatTextView
| Modifier and Type | Class and Description |
|---|---|
static class |
LoggerTextView.DefaultLogDecorator
默认日志装饰接口
|
static class |
LoggerTextView.DefaultLogFormatter
默认日志格式化接口
|
static interface |
LoggerTextView.ILogDecorator
日志装饰接口
|
static interface |
LoggerTextView.ILogFormatter
日志格式化接口
|
static class |
LoggerTextView.LogType
日志类型
|
| Constructor and Description |
|---|
LoggerTextView(android.content.Context context) |
LoggerTextView(android.content.Context context,
android.util.AttributeSet attrs) |
LoggerTextView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLog(java.lang.String logContent,
LoggerTextView.LogType logType)
添加日志
|
void |
clearLog()
清除日志
|
LoggerTextView.ILogDecorator |
getLogDecorator()
获取日志装饰接口
|
LoggerTextView.ILogFormatter |
getLogFormatter()
获取日志格式化接口
|
void |
logCustom(java.lang.String logContent)
添加自定义等级日志
|
void |
logError(java.lang.String logContent)
添加错误日志
|
void |
logNormal(java.lang.String logContent)
添加普通日志
|
void |
logSuccess(java.lang.String logContent)
添加成功日志
|
void |
logWarning(java.lang.String logContent)
添加警告日志
|
LoggerTextView |
setLogDecorator(LoggerTextView.ILogDecorator logDecorator)
设置日志装饰接口
|
LoggerTextView |
setLogFormatter(LoggerTextView.ILogFormatter logFormatter)
设置日志格式化接口
|
public LoggerTextView(android.content.Context context)
public LoggerTextView(android.content.Context context,
android.util.AttributeSet attrs)
public LoggerTextView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
public LoggerTextView setLogFormatter(LoggerTextView.ILogFormatter logFormatter)
logFormatter - 日志格式化接口public LoggerTextView setLogDecorator(LoggerTextView.ILogDecorator logDecorator)
logDecorator - 日志装饰接口public void logNormal(java.lang.String logContent)
logContent - 日志内容public void logSuccess(java.lang.String logContent)
logContent - 日志内容public void logError(java.lang.String logContent)
logContent - 日志内容public void logWarning(java.lang.String logContent)
logContent - 日志内容public void logCustom(java.lang.String logContent)
logContent - 日志内容public void addLog(java.lang.String logContent,
LoggerTextView.LogType logType)
logContent - 日志内容logType - 日志类型public LoggerTextView.ILogDecorator getLogDecorator()
public LoggerTextView.ILogFormatter getLogFormatter()
public void clearLog()