本文整理匯總了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);
}