1 7 package org.jahia.sqlprofiler.gui; 8 9 import org.apache.log4j.Priority; 10 import org.apache.log4j.spi.LoggingEvent; 11 12 19 class EventDetails { 20 21 22 private final long mTimeStamp; 23 24 private final Priority mPriority; 25 26 private final String mCategoryName; 27 28 private final String mNDC; 29 30 private final String mThreadName; 31 32 private final String mMessage; 33 34 private final String [] mThrowableStrRep; 35 36 private final String mLocationDetails; 37 38 49 EventDetails(long aTimeStamp, 50 Priority aPriority, 51 String aCategoryName, 52 String aNDC, 53 String aThreadName, 54 String aMessage, 55 String [] aThrowableStrRep, 56 String aLocationDetails) 57 { 58 mTimeStamp = aTimeStamp; 59 mPriority = aPriority; 60 mCategoryName = aCategoryName; 61 mNDC = aNDC; 62 mThreadName = aThreadName; 63 mMessage = aMessage; 64 mThrowableStrRep = aThrowableStrRep; 65 mLocationDetails = aLocationDetails; 66 } 67 68 73 EventDetails(LoggingEvent aEvent) { 74 75 this(aEvent.timeStamp, 76 aEvent.getLevel(), 77 aEvent.getLoggerName(), 78 aEvent.getNDC(), 79 aEvent.getThreadName(), 80 aEvent.getRenderedMessage(), 81 aEvent.getThrowableStrRep(), 82 (aEvent.getLocationInformation() == null) 83 ? null : aEvent.getLocationInformation().fullInfo); 84 } 85 86 87 long getTimeStamp() { 88 return mTimeStamp; 89 } 90 91 92 Priority getPriority() { 93 return mPriority; 94 } 95 96 97 String getCategoryName() { 98 return mCategoryName; 99 } 100 101 102 String getNDC() { 103 return mNDC; 104 } 105 106 107 String getThreadName() { 108 return mThreadName; 109 } 110 111 112 String getMessage() { 113 return mMessage; 114 } 115 116 117 String getLocationDetails(){ 118 return mLocationDetails; 119 } 120 121 122 String [] getThrowableStrRep() { 123 return mThrowableStrRep; 124 } 125 } 126 | Popular Tags |