|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jminor.common.model.LogEntry
public final class LogEntry
A class encapsulating a log entry for logging method calls.
Constructor Summary | |
---|---|
LogEntry()
Instantiates a new empty log entry. |
|
LogEntry(LogEntry entry)
A copy constructor |
|
LogEntry(String method,
String entryMessage,
long time,
long nanoTime,
Throwable exception)
Initializes a new LogEntry instance |
Method Summary | |
---|---|
int |
compareTo(LogEntry o)
|
boolean |
equals(Object obj)
|
long |
getDelta()
|
String |
getEntryMessage()
|
long |
getEntryTime()
|
String |
getEntryTimeFormatted()
|
String |
getExitMessage()
|
long |
getExitTime()
|
String |
getExitTimeFormatted()
|
String |
getMethod()
|
String |
getStackTrace()
|
List<LogEntry> |
getSubLog()
|
int |
hashCode()
|
boolean |
isComplete()
|
void |
reset()
Clears all info from this entry |
void |
set(String method,
String entryMessage,
long time,
long nanoTime,
Throwable exception)
Initializes this LogEntry instance |
LogEntry |
setException(Throwable exception)
|
LogEntry |
setExitMessage(String message)
|
LogEntry |
setExitTimeNano(long exitTimeNano)
|
void |
setSubLog(List<LogEntry> subLog)
|
String |
toString()
|
String |
toString(int indentation)
Returns a string representation of this log entry. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LogEntry()
public LogEntry(LogEntry entry)
entry
- the log entry to copypublic LogEntry(String method, String entryMessage, long time, long nanoTime, Throwable exception)
method
- the method being loggedentryMessage
- a message describing for example the method argumentstime
- the time at which to log the eventnanoTime
- the nano precision time at which to log the eventexception
- the exception thrown by the method execution if anyMethod Detail |
---|
public void set(String method, String entryMessage, long time, long nanoTime, Throwable exception)
method
- the method being loggedentryMessage
- a message describing for example the method argumentstime
- the time at which to log the eventnanoTime
- the nano precision time at which to log the eventexception
- the exception thrown by the method execution if anypublic void reset()
public long getEntryTime()
public LogEntry setExitTimeNano(long exitTimeNano)
exitTimeNano
- the exit time in nano precision
public long getExitTime()
public long getDelta()
public String getEntryMessage()
public String getMethod()
public String getStackTrace()
public LogEntry setExitMessage(String message)
message
- the exit message
public String getExitMessage()
public LogEntry setException(Throwable exception)
exception
- the exception
public String getEntryTimeFormatted()
public String getExitTimeFormatted()
public List<LogEntry> getSubLog()
public void setSubLog(List<LogEntry> subLog)
subLog
- the sub logpublic boolean isComplete()
public int compareTo(LogEntry o)
compareTo
in interface Comparable<LogEntry>
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public String toString(int indentation)
indentation
- the number of tab indents to prefix the string with
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |