不知道是不是我理解的这个样子:
StackTraceElement[] stackTraceElements = Thread.currentThread()
.getStackTrace();
HiLog.info(label, "The stackTraceElements length: %{public}s", stackTraceElements.length);
for (int i = 0; i < stackTraceElements.length; ++i) {
HiLog.info(label, "nn---- the %{public}s element ----", i);
HiLog.info(label, "toString: %{public}s", stackTraceElements
.toString());
HiLog.info(label, "ClassName: %{public}s", stackTraceElements.getClassName());
HiLog.info(label, "FileName: %{public}s", stackTraceElements.getFileName());
HiLog.info(label, "LineNumber: %{public}s", stackTraceElements.getLineNumber());
HiLog.info(label, "MethodName: %{public}s", stackTraceElements.getMethodName());
}
不知道是不是我理解的这个样子:
StackTraceElement[] stackTraceElements = Thread.currentThread()
.getStackTrace();
HiLog.info(label, "The stackTraceElements length: %{public}s", stackTraceElements.length);
for (int i = 0; i < stackTraceElements.length; ++i) {
HiLog.info(label, "nn---- the %{public}s element ----", i);
HiLog.info(label, "toString: %{public}s", stackTraceElements
.toString());
HiLog.info(label, "ClassName: %{public}s", stackTraceElements.getClassName());
HiLog.info(label, "FileName: %{public}s", stackTraceElements.getFileName());
HiLog.info(label, "LineNumber: %{public}s", stackTraceElements.getLineNumber());
HiLog.info(label, "MethodName: %{public}s", stackTraceElements.getMethodName());
}
举报