Methods Summary |
---|
public java.util.List | getAttrs() return mAttrs;
|
public java.lang.String | getLogFile() return mLogFile;
|
public java.lang.String | getLogLevel() return mLogLevel;
|
public com.sun.appserv.management.ext.logging.Logging | getLogging()
return mLogging;
|
public int | getMaxRecords() return mMaxRecords;
|
public java.util.Set | getModules() return mModules;
|
public boolean | getSearchForward() return mSearchForward;
|
public long | getStartIndex() return mStartIndex;
|
public long | getStartTime() return mStartTime;
|
public long | getStopTime() return mStopTime;
|
public com.sun.appserv.management.ext.logging.LogQueryResult | query()Query for LogRecords based upon the current settings.
The startIndex is updated appropriately following the query,
depending on the search direction. A subsequent
query will begin at the next available index.
final Logging logging = getLogging();
assert( logging != null );
final LogQueryResult result = logging.queryServerLog(
mLogFile,
mStartIndex,
mSearchForward,
mMaxRecords,
mStartTime,
mStopTime,
mLogLevel,
mModules,
mAttrs );
final LogQueryEntry[] entries = result.getEntries();
if ( entries.length != 0 )
{
// update start index
if ( mSearchForward )
{
mStartIndex = entries[ entries.length - 1 ].getRecordNumber() + 1;
}
else
{
mStartIndex = entries[ 0 ].getRecordNumber();
}
}
return result;
|
public void | setAttrs(java.util.List attrs)
mAttrs.clear();
mAttrs.addAll( attrs );
|
public void | setLogFile(java.lang.String name)If the specified log file is different, the startIndex
is reset appropriately.
if ( ! mLogFile.equals( name ) )
{
mLogFile = name;
setStartIndex( getSearchForward() ? FIRST_RECORD : LAST_RECORD );
}
|
public void | setLogLevel(java.lang.String logLevel)
mLogLevel = logLevel;
|
public void | setMaxRecords(int maxRecords)
mMaxRecords = maxRecords;
|
public void | setModule(java.lang.String module)
mModules = GSetUtil.newSet( module );
|
public void | setModules(java.util.Set modules)
mModules = modules;
|
public void | setSearchForward(boolean searchForward)
mSearchForward = true;
|
public void | setStartIndex(int startIndex)
mStartIndex = startIndex;
|
public void | setStartTime(java.lang.Long startTime)
mStartTime = startTime;
|
public void | setStopTime(java.lang.Long stopTime)
mStopTime = stopTime;
|