/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** * Set stack trace information associated with this Log4JLogRecord. * When this method is called, the stack trace in a * String-based format is made * available via the getThrownStackTrace() method. * * @param throwableInfo An org.apache.log4j.spi.ThrowableInformation to * associate with this Log4JLogRecord. * @see #getThrownStackTrace() */ public void setThrownStackTrace(ThrowableInformation throwableInfo) { String[] stackTraceArray = throwableInfo.getThrowableStrRep(); StringBuffer stackTrace = new StringBuffer(); String nextLine; for (int i = 0; i < stackTraceArray.length; i++) { nextLine = stackTraceArray[i] + "\n"; stackTrace.append(nextLine); } _thrownStackTrace = stackTrace.toString(); }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer toAppendTo) { if (maxLines != 0) { ThrowableInformation information = event.getThrowableInformation(); if (information != null) { String[] stringRep = information.getThrowableStrRep(); int length = stringRep.length; if (maxLines < 0) { length += maxLines; } else if (length > maxLines) { length = maxLines; } for (int i = 0; i < length; i++) { String string = stringRep[i]; toAppendTo.append(string).append("\n"); } } } }
private String getFilteredStacktrace(ThrowableInformation throwableInformation) { StringBuffer buffer = new StringBuffer(); String[] s = throwableInformation.getThrowableStrRep(); boolean previousLineWasAMatch = false; int consecutiveFilteredCount = 0; for (int j = 0; j < s.length; j++) { String string = s[j]; boolean shouldAppend = true; if (startsWithAFilteredPAttern(string)) { shouldAppend = false; previousLineWasAMatch = true; consecutiveFilteredCount++; } else { appendFilteredLineIndicator(buffer, previousLineWasAMatch, consecutiveFilteredCount); consecutiveFilteredCount = 0; previousLineWasAMatch = false; } if (shouldAppend) { buffer.append(string); buffer.append(lineSeparator); } } // In case consecutive filtered lines run to end of trace. appendFilteredLineIndicator(buffer, previousLineWasAMatch, consecutiveFilteredCount); return buffer.toString(); }
: ""; json.writeStringField(EXCEPTION_CLASS, eclass); String[] stackTrace = ti.getThrowableStrRep(); json.writeArrayFieldStart(STACK); for (String row : stackTrace) {
private String getFilteredStacktrace(ThrowableInformation throwableInformation) { StringBuffer buffer = new StringBuffer(); String[] s = throwableInformation.getThrowableStrRep(); boolean previousLineWasAMatch = false; int consecutiveFilteredCount = 0; for (int j = 0; j < s.length; j++) { String string = s[j]; boolean shouldAppend = true; if (startsWithAFilteredPAttern(string)) { shouldAppend = false; previousLineWasAMatch = true; consecutiveFilteredCount++; } else { appendFilteredLineIndicator(buffer, previousLineWasAMatch, consecutiveFilteredCount); consecutiveFilteredCount = 0; previousLineWasAMatch = false; } if (shouldAppend) { buffer.append(string); buffer.append(lineSeparator); } } // In case consecutive filtered lines run to end of trace. appendFilteredLineIndicator(buffer, previousLineWasAMatch, consecutiveFilteredCount); return buffer.toString(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) { return null; } else { return throwableInfo.getThrowableStrRep(); } }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) { return null; } else { return throwableInfo.getThrowableStrRep(); } }
/** * Set stack trace information associated with this Log4JLogRecord. * When this method is called, the stack trace in a * String-based format is made * available via the getThrownStackTrace() method. * * @param throwableInfo An org.apache.log4j.spi.ThrowableInformation to * associate with this Log4JLogRecord. * @see #getThrownStackTrace() */ public void setThrownStackTrace(ThrowableInformation throwableInfo) { String[] stackTraceArray = throwableInfo.getThrowableStrRep(); StringBuffer stackTrace = new StringBuffer(); String nextLine; for (int i = 0; i < stackTraceArray.length; i++) { nextLine = stackTraceArray[i] + "\n"; stackTrace.append(nextLine); } _thrownStackTrace = stackTrace.toString(); }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer toAppendTo) { if (maxLines != 0) { ThrowableInformation information = event.getThrowableInformation(); if (information != null) { String[] stringRep = information.getThrowableStrRep(); int length = stringRep.length; if (maxLines < 0) { length += maxLines; } else if (length > maxLines) { length = maxLines; } for (int i = 0; i < length; i++) { String string = stringRep[i]; toAppendTo.append(string).append("\n"); } } } }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
javaTextPane.getProxy().setCaretPosition(javaTextPane.getProxy().getDocument().getLength()); if (throwableInformation != null && throwableInformation.getThrowableStrRep() != null) { for (String rep: throwableInformation.getThrowableStrRep()) { javaTextPane.append(rep, ERROR);
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }