本文整理汇总了Java中ch.qos.logback.classic.spi.IThrowableProxy.getCommonFrames方法的典型用法代码示例。如果您正苦于以下问题:Java IThrowableProxy.getCommonFrames方法的具体用法?Java IThrowableProxy.getCommonFrames怎么用?Java IThrowableProxy.getCommonFrames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ch.qos.logback.classic.spi.IThrowableProxy
的用法示例。
在下文中一共展示了IThrowableProxy.getCommonFrames方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import ch.qos.logback.classic.spi.IThrowableProxy; //导入方法依赖的package包/类
void render(StringBuilder sbuf, IThrowableProxy tp) {
printFirstLine(sbuf, tp);
int commonFrames = tp.getCommonFrames();
StackTraceElementProxy[] stepArray = tp.getStackTraceElementProxyArray();
for (int i = 0; i < stepArray.length - commonFrames; i++) {
StackTraceElementProxy step = stepArray[i];
sbuf.append(TRACE_PREFIX);
sbuf.append(Transform.escapeTags(step.toString()));
sbuf.append(CoreConstants.LINE_SEPARATOR);
}
if (commonFrames > 0) {
sbuf.append(TRACE_PREFIX);
sbuf.append("\t... ").append(commonFrames).append(" common frames omitted").append(CoreConstants.LINE_SEPARATOR);
}
}
示例2: render
import ch.qos.logback.classic.spi.IThrowableProxy; //导入方法依赖的package包/类
void render(StringBuilder sbuf, IThrowableProxy tp) {
printFirstLine(sbuf, tp);
int commonFrames = tp.getCommonFrames();
StackTraceElementProxy[] stepArray = tp.getStackTraceElementProxyArray();
for (int i = 0; i < stepArray.length - commonFrames; i++) {
StackTraceElementProxy step = stepArray[i];
sbuf.append(TRACE_PREFIX);
sbuf.append(Transform.escapeTags(step.toString()));
sbuf.append(CoreConstants.LINE_SEPARATOR);
}
if (commonFrames > 0) {
sbuf.append(TRACE_PREFIX);
sbuf.append("\t... ").append(commonFrames).append(" common frames omitted")
.append(CoreConstants.LINE_SEPARATOR);
}
}
示例3: subjoinThrowableProxy
import ch.qos.logback.classic.spi.IThrowableProxy; //导入方法依赖的package包/类
void subjoinThrowableProxy(StringBuilder buf, IThrowableProxy tp) {
subjoinFirstLine(buf, tp);
buf.append(CoreConstants.LINE_SEPARATOR);
final StackTraceElementProxy[] stepArray = tp.getStackTraceElementProxyArray();
final int commonFrames = tp.getCommonFrames();
int maxIndex = stepArray.length;
if (commonFrames > 0) {
maxIndex -= commonFrames;
}
for (int i = 0; i < maxIndex; i++) {
final String string = stepArray[i].toString();
buf.append(PREFIX);
buf.append(string);
extraData(buf, stepArray[i]); // allow other data to be added
buf.append(CoreConstants.LINE_SEPARATOR);
}
if (commonFrames > 0) {
buf.append("!... ").append(tp.getCommonFrames()).append(
" common frames omitted").append(CoreConstants.LINE_SEPARATOR);
}
}
示例4: printFirstLine
import ch.qos.logback.classic.spi.IThrowableProxy; //导入方法依赖的package包/类
public void printFirstLine(StringBuilder sb, IThrowableProxy tp) {
int commonFrames = tp.getCommonFrames();
if (commonFrames > 0) {
sb.append("\t").append(CoreConstants.CAUSED_BY);
}
sb.append(tp.getClassName()).append(": ").append(Transform.escapeTags(tp.getMessage()));
sb.append(CoreConstants.LINE_SEPARATOR);
}
示例5: subjoinSTEPArray
import ch.qos.logback.classic.spi.IThrowableProxy; //导入方法依赖的package包/类
protected void subjoinSTEPArray(StringBuilder buf, int indent, IThrowableProxy tp) {
StackTraceElementProxy[] stepArray = tp.getStackTraceElementProxyArray();
int commonFrames = tp.getCommonFrames();
boolean unrestrictedPrinting = lengthOption > stepArray.length;
int maxIndex = (unrestrictedPrinting) ? stepArray.length : lengthOption;
if (commonFrames > 0 && unrestrictedPrinting) {
maxIndex -= commonFrames;
}
int ignoredCount = 0;
for (int i = 0; i < maxIndex; i++) {
StackTraceElementProxy element = stepArray[i];
if (!isIgnoredStackTraceLine(element.toString())) {
ThrowableProxyUtil.indent(buf, indent);
printStackLine(buf, ignoredCount, element);
ignoredCount = 0;
buf.append(CoreConstants.LINE_SEPARATOR);
} else {
++ignoredCount;
if (maxIndex < stepArray.length) {
++maxIndex;
}
}
}
if (ignoredCount > 0) {
printIgnoredCount(buf, ignoredCount);
buf.append(CoreConstants.LINE_SEPARATOR);
}
if (commonFrames > 0 && unrestrictedPrinting) {
ThrowableProxyUtil.indent(buf, indent);
buf.append("... ").append(tp.getCommonFrames()).append(
" common frames omitted").append(CoreConstants.LINE_SEPARATOR);
}
}
示例6: printFirstLine
import ch.qos.logback.classic.spi.IThrowableProxy; //导入方法依赖的package包/类
public void printFirstLine(StringBuilder sb, IThrowableProxy tp) {
int commonFrames = tp.getCommonFrames();
if (commonFrames > 0) {
sb.append("<br />").append(CoreConstants.CAUSED_BY);
}
sb.append(tp.getClassName()).append(": ").append(
Transform.escapeTags(tp.getMessage()));
sb.append(CoreConstants.LINE_SEPARATOR);
}
示例7: subjoinFirstLine
import ch.qos.logback.classic.spi.IThrowableProxy; //导入方法依赖的package包/类
private void subjoinFirstLine(StringBuilder buf, IThrowableProxy tp) {
final int commonFrames = tp.getCommonFrames();
if (commonFrames > 0) {
buf.append(CoreConstants.CAUSED_BY);
}
subjoinExceptionMessage(buf, tp);
}