public class DebugPrinter extends AbsPrinter
Note that messages longer than 4K characters will be truncated into parts, to avoid default logcat 4K issue.
| Constructor and Description |
|---|
DebugPrinter(boolean isDebug) |
DebugPrinter(boolean isDebug,
int maxLengthPerLine) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
onIntercept(int level,
String tag,
Category category,
String msg)
Decide whether this item of log should be intercepted.
|
void |
print(int level,
String tag,
String msg)
Do the real output operation, e.g.
|
getFormatter, getMaxLengthPerLine, getSoftWrapper, getStyle, setFormatter, setInterceptor, setSoftWrapper, setStylepublic DebugPrinter(boolean isDebug)
public DebugPrinter(boolean isDebug,
int maxLengthPerLine)
@CheckResult public boolean onIntercept(int level, @NonNull String tag, @Nullable Category category, @NonNull String msg)
InterceptoronIntercept in interface InterceptoronIntercept in class AbsPrinterlevel - print level of this log.category - category of this log, if specified.msg - content of this log(before formatting!). Note if msg in the
original request is null, you'll get an empty string here.public void print(int level,
@NonNull
String tag,
@NonNull
String msg)
Printerlevel - print level of this log.msg - content of this log(already formatted and soft wrapped, if needed).