@Taxonomy(stability=UNCOMMITTED)
public interface LogQuery
| Modifier and Type | Interface and Description |
|---|---|
static class |
LogQuery.Helper
helper class, in particular to convert results from
queryServerLog(java.lang.String, long, boolean, int, java.lang.Long, java.lang.Long, java.lang.String, java.util.Set<java.lang.String>, java.util.List<javax.management.Attribute>, java.lang.String) |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_RECORDS
Value for the
maximumNumberOfResults parameter to
queryServerLog(java.lang.String, long, boolean, int, java.lang.Long, java.lang.Long, java.lang.String, java.util.Set<java.lang.String>, java.util.List<javax.management.Attribute>, java.lang.String) which returns all results. |
static int |
FIRST_RECORD
|
static int |
LAST_RECORD
|
static String |
LOWEST_SUPPORTED_QUERY_LEVEL
The lowest supported log level for which queries may be performed.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getDiagnosticCauses(String messageID,
String moduleName) |
String[] |
getDiagnosticChecks(String messageID,
String moduleName) |
String |
getDiagnosticURI(String messageID) |
List<Serializable[]> |
queryServerLog(String logFilename,
long startIndex,
boolean searchForward,
int maxRecords,
Long fromTime,
Long toTime,
String logLevel,
Set<String> modules,
List<Attribute> nameValuePairs,
String anySearch)
Query a server log file for records beginning at index
startIndex. |
static final String LOWEST_SUPPORTED_QUERY_LEVEL
static final int ALL_RECORDS
maximumNumberOfResults parameter to
queryServerLog(java.lang.String, long, boolean, int, java.lang.Long, java.lang.Long, java.lang.String, java.util.Set<java.lang.String>, java.util.List<javax.management.Attribute>, java.lang.String) which returns all results.static final int FIRST_RECORD
startIndex parameter to
queryServerLog(java.lang.String, long, boolean, int, java.lang.Long, java.lang.Long, java.lang.String, java.util.Set<java.lang.String>, java.util.List<javax.management.Attribute>, java.lang.String).static final int LAST_RECORD
startIndex parameter to
queryServerLog(java.lang.String, long, boolean, int, java.lang.Long, java.lang.Long, java.lang.String, java.util.Set<java.lang.String>, java.util.List<javax.management.Attribute>, java.lang.String).@ManagedOperation(impact=0) List<Serializable[]> queryServerLog(@Param(name="logFilename") String logFilename, @Param(name="startIndex") long startIndex, @Param(name="searchForward") boolean searchForward, @Param(name="maxRecords") int maxRecords, @Param(name="fromTime") Long fromTime, @Param(name="toTime") Long toTime, @Param(name="logLevel") String logLevel, @Param(name="modules") Set<String> modules, @Param(name="nameValuePairs") List<Attribute> nameValuePairs, @Param(name="anySearch") String anySearch)
startIndex.
The name parameter may be LogFileAccess.MOST_RECENT_NAME
to query the current server log file, or may be any specific server log
file as returned by LogFileAccess.getLogFileNames(java.lang.String).
To query log records starting at the beginning of the file and moving forward,
use startIndex=FIRST_RECORD. To query records beginning at the end of the
file and moving backwards, use startIndex=LAST_RECORD and
specify searchForward=false.
If searchForward is true,
then log records beginning with
startRecord (inclusive) and later
are considered by the query.
If searchForward is false,
then log records beginning at
startRecord - 1 and earlier are considered by the query.
Because a log file could be deleted
QUESTIONS TO RESOLVE
name - a specific log file name or LogFileAccess.MOST_RECENT_NAMEstartIndex - the location within the LogFile to begin.searchForward - true to move forward, false to move backward from startIndexmaxRecords - the maximum number of results to be returned, ALL_RECORDS for allfromTime - the lower bound time, may be null (inclusive)toTime - the upper bound time, may be null (exclusive)logLevel - the minimum log level to return, see Levelmodules - one or more modules as defined in LogModuleNames or
any valid Logger namenameValuePairs - name-value pairs to match. Names need not be unique.LogRecordFields,
Over the wire transmission of 'UnprocessedConfigChange' would require the client to have its class;
as delivered the Object[] contains only standard JDK types.
See the Javadoc for {@link LogQueryResult} for the order of values in the Object[].
Clients with access to the class can use {@link SystemStatus.Helper#toLogQueryResult}@ManagedOperation(impact=0) String[] getDiagnosticCauses(@Param(name="messageID") String messageID, @Param(name="moduleName") String moduleName)
@ManagedOperation(impact=0) String[] getDiagnosticChecks(@Param(name="messageID") String messageID, @Param(name="moduleName") String moduleName)
Copyright © 2017. All rights reserved.