public class TestLogger extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addEntry(java.lang.String logName,
java.lang.CharSequence entry) |
void |
addEntry(java.lang.String logName,
java.lang.Object... values) |
void |
addTimeDiff(java.lang.String targetName,
java.lang.String sourceName)
Adds the time span that has passed between the call of this method and the time stored in
sourceName to the value in targetName . |
void |
addToNumericValue(java.lang.String valueName,
long addend) |
static TestLogger |
getInstance() |
java.util.List<java.lang.CharSequence> |
getLog(java.lang.String logName)
Returns the log with the specified name.
|
long |
getNumericValue(java.lang.String timeName) |
boolean |
isPrintDirectly() |
void |
logNumericValue(java.lang.String logName,
java.lang.String valueName) |
void |
logTimeSince(java.lang.String logName,
java.lang.String timeName) |
void |
printLog(java.io.PrintStream out,
java.lang.String logName) |
void |
printLog(java.lang.String logName) |
void |
printLogToErr(java.lang.String logName) |
void |
saveCurrentTime(java.lang.String timeName) |
void |
setNumericValue(java.lang.String valueName,
long value) |
void |
setPrintDirectly(boolean printDirectly) |
public static TestLogger getInstance()
public boolean isPrintDirectly()
public void setPrintDirectly(boolean printDirectly)
public java.util.List<java.lang.CharSequence> getLog(java.lang.String logName)
logName
- the name of the log listpublic void addEntry(java.lang.String logName, java.lang.CharSequence entry)
public void addEntry(java.lang.String logName, java.lang.Object... values)
public long getNumericValue(java.lang.String timeName)
public void setNumericValue(java.lang.String valueName, long value)
public void addToNumericValue(java.lang.String valueName, long addend)
public void saveCurrentTime(java.lang.String timeName)
public void addTimeDiff(java.lang.String targetName, java.lang.String sourceName)
sourceName
to the value in targetName
.
If there is no value stored for targetName
just the time span is saved under this name.
If there is no value stored for sourceName
this method does nothing.
targetName
- the name of the time entry to add the time span tosourceName
- the name of the time entry marking the start of the time span to be measuredpublic void logNumericValue(java.lang.String logName, java.lang.String valueName)
public void logTimeSince(java.lang.String logName, java.lang.String timeName)
public void printLog(java.io.PrintStream out, java.lang.String logName)
public void printLog(java.lang.String logName)
public void printLogToErr(java.lang.String logName)