1 16 17 package org.apache.log4j.lf5; 18 19 import org.apache.log4j.spi.ThrowableInformation; 20 21 28 29 31 public class Log4JLogRecord extends LogRecord { 32 36 40 44 48 51 public Log4JLogRecord() { 52 } 53 54 65 public boolean isSevereLevel() { 66 boolean isSevere = false; 67 68 if (LogLevel.ERROR.equals(getLevel()) || 69 LogLevel.FATAL.equals(getLevel())) { 70 isSevere = true; 71 } 72 73 return isSevere; 74 } 75 76 86 public void setThrownStackTrace(ThrowableInformation throwableInfo) { 87 String [] stackTraceArray = throwableInfo.getThrowableStrRep(); 88 89 StringBuffer stackTrace = new StringBuffer (); 90 String nextLine; 91 92 for (int i = 0; i < stackTraceArray.length; i++) { 93 nextLine = stackTraceArray[i] + "\n"; 94 stackTrace.append(nextLine); 95 } 96 97 _thrownStackTrace = stackTrace.toString(); 98 } 99 100 104 108 112 } 113 114 115 116 | Popular Tags |