|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Defines common operations to read log messages (a message record) from a log destination. Currently, this mainly handles sequential records retrieval starting either from the oldest or latest time point. To avoid messing up the sequential reading from concurrent readers on the same log destination, it is recommended to get a copy of this 'readable' log for each reader.
| Method Summary | |
boolean |
areLoggingAttributesEditable()
This method verifies whether the attributes like severity can be set. |
IReadableLog |
createReadableLog()
Create a copy(clone) of this readable log, and thus the cursor to retrieve message records for each reader will be independent. |
long |
getLastModified()
|
java.lang.String |
getLogId()
Return an id for the corresponding Log that is unique |
ILoggingResultSet |
getNextMatch(java.lang.String[] searchTokens)
This method returns LoggingResultSet that contains one or zero LogRecords. |
ILoggingResultSet |
getNextMatch(java.lang.String[] searchTokens,
boolean ignoreCase)
This method returns LoggingResultSet that contains one or zero LogRecords. |
ILoggingResultSet |
getPreviousMatch(java.lang.String[] searchTokens)
This method returns LoggingResultSet that contains one or zero LogRecords. |
ILoggingResultSet |
getPreviousMatch(java.lang.String[] searchTokens,
boolean ignoreCase)
This method returns LoggingResultSet that contains one or zero LogRecords. |
ILoggingResultSet |
readLatestMsgRecords(int numMsg)
Retrieve the latest n messages and return them in a result set. |
java.util.ArrayList |
readLatestRecords(int numMsg)
Deprecated. Resulting logrecords do not indicate status which is not good enough for complicated scenario like logfile rotation. It will kept around for a while, but will be eventually replaced by readLatestMsgRecords(int). |
ILoggingResultSet |
readNextMsgRecords(int numMsg)
Continue retrieving x relatively newer messages, picked from the point where the last message read from the previous read operation, with respective to the direction of the previous read operation. |
java.util.ArrayList |
readNextRecords(int numMsg)
Deprecated. Resulting logrecords do not indicate status which is not good enough for complicated scenario like logfile rotation. It will kept around for a while, but will be eventually replaced by readNextMsgRecords(int). |
ILoggingResultSet |
readOldestMsgRecords(int numMsg)
Retrieve the oldest n messages and return them in a result set. |
java.util.ArrayList |
readOldestRecords(int numMsg)
Deprecated. Resulting logrecords do not indicate status which is not good enough for complicated scenario like logfile rotation. It will kept around for a while, but will be eventually replaced by readOldestMsgRecords(int). |
ILoggingResultSet |
readPrevMsgRecords(int numMsg)
Continue retrieving x relatively older messages, picked from the point where the last message read from the previous read operation, with respective to the direction of the previous read operation. |
java.util.ArrayList |
readPrevRecords(int numMsg)
Deprecated. Resulting logrecords do not indicate status which is not good enough for complicated scenario like logfile rotation. It will kept around for a while, but will be eventually replaced by readPrevMsgRecords(int). |
| Methods inherited from interface com.sap.tc.logging.interfaces.IFileLog |
getCnt, getFileLength, getFileName, getLimit, getParent, getPath, getPattern, isAppend |
| Methods inherited from interface com.sap.tc.logging.interfaces.ILog |
addFilter, beLogged, close, flush, getEffectiveSeverity, getEncoding, getFilters, getFooter, getFormatter, getHeader, getLogTypeAccessibility, getNumberOfLogRecordsWritten, isAutoFlush, isClosed, isOpened, open, removeFilter, removeFilters, setAutoFlush, setEffectiveSeverity, setEncoding, setFormatter, setLogTypeAccessibility, status |
| Methods inherited from interface com.sap.tc.logging.interfaces.IObjectInfo |
getDescription, getName, getVerInUse |
| Method Detail |
public java.lang.String getLogId()
public IReadableLog createReadableLog()
public java.util.ArrayList readLatestRecords(int numMsg)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
readLatestMsgRecords(int).
Retrieve the latest n messages and return them in an array list. This method always refers to the newest messages even the output file is growing.
numMsg - Number of messages (>0) to be retrievedUnsupportedFormatException - java.lang.IllegalArgumentException - Negative number or zero messages requestedjava.io.IOException - Problem reading data from output file
public java.util.ArrayList readOldestRecords(int numMsg)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
readOldestMsgRecords(int).
Retrieve the oldest n messages and return them in an array list. This method
always refers to the currently available oldest messages which may be
different due to the rotating feature(not covered at this stage) from the
constantly growing output file size.
numMsg - Number of messages (>0) to be retrievedUnsupportedFormatException - java.lang.IllegalArgumentException - Negative number or zero messages requestedjava.io.IOException - Problem reading data from output file
public java.util.ArrayList readPrevRecords(int numMsg)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
readPrevMsgRecords(int).
Continue retrieving x relatively older messages, picked from the point where the last message read from the previous read operation, with respective to the direction of the previous read operation.
If this method is called without a prior call to readLatestRecords(int) or readOldestRecords(int), this will
behave the same as calling readLatestRecords(numMsg) .
Messages are returned in an array list.
numMsg - Number of messages(>0) to be retrievedUnsupportedFormatException - java.lang.IllegalArgumentException - Negative number or zero messages requestedjava.io.IOException - Problem reading data from output file
public java.util.ArrayList readNextRecords(int numMsg)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
readNextMsgRecords(int).
Continue retrieving x relatively newer messages, picked from the point where the last message read from the previous read operation, with respective to the direction of the previous read operation.
If this method is called without a prior call to readLatestRecords(int) or readOldestRecords(int), this will
behave the same as calling readOldestRecords(numMsg) .
Messages are returned in an array list.
numMsg - Number of messages(>0) to be retrievedUnsupportedFormatException - java.lang.IllegalArgumentException - Negative number or zero messages requestedjava.io.IOException - Problem reading data from output file
public ILoggingResultSet readLatestMsgRecords(int numMsg)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
numMsg - Number of messages (>0) to be retrievedUnsupportedFormatException - java.lang.IllegalArgumentException - Negative number or zero messages requestedjava.io.IOException - Problem reading data from output fileLoggingResultSet
public ILoggingResultSet readOldestMsgRecords(int numMsg)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
numMsg - Number of messages (>0) to be retrievedUnsupportedFormatException - java.lang.IllegalArgumentException - Negative number or zero messages requestedjava.io.IOException - Problem reading data from output fileLoggingResultSet
public ILoggingResultSet readPrevMsgRecords(int numMsg)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
readLatestMsgRecords(int) or readOldestMsgRecords(int), this will behave the same as calling readLatestMsgRecords(numMsg)
.numMsg - Number of messages(>0) to be retrievedUnsupportedFormatException - java.lang.IllegalArgumentException - Negative number or zero messages requestedjava.io.IOException - Problem reading data from output fileLoggingResultSet
public ILoggingResultSet readNextMsgRecords(int numMsg)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
readLatestMsgRecords(int) or readOldestMsgRecords(int), this will behave the same as calling readOldestMsgRecords(numMsg)
.numMsg - Number of messages(>0) to be retrievedUnsupportedFormatException - java.lang.IllegalArgumentException - Negative number or zero messages requestedjava.io.IOException - Problem reading data from output fileLoggingResultSet
public ILoggingResultSet getNextMatch(java.lang.String[] searchTokens)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
searchTokens - java.lang.IllegalArgumentException - UnsupportedFormatException - java.io.IOException -
public ILoggingResultSet getPreviousMatch(java.lang.String[] searchTokens)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
searchTokens - java.lang.IllegalArgumentException - UnsupportedFormatException - java.io.IOException -
public ILoggingResultSet getNextMatch(java.lang.String[] searchTokens,
boolean ignoreCase)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
searchTokens - ignoreCase - java.lang.IllegalArgumentException - UnsupportedFormatException - java.io.IOException -
public ILoggingResultSet getPreviousMatch(java.lang.String[] searchTokens,
boolean ignoreCase)
throws java.lang.IllegalArgumentException,
UnsupportedFormatException,
java.io.IOException
searchTokens - ignoreCase - java.lang.IllegalArgumentException - UnsupportedFormatException - java.io.IOException - public boolean areLoggingAttributesEditable()
public long getLastModified()
throws java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||