Interface LogQuery
-
- All Known Subinterfaces:
Logging
@Taxonomy(stability=UNCOMMITTED) public interface LogQuery
Provides access to log messages already present in the log file.- Since:
- AS 9.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
LogQuery.Helper
helper class, in particular to convert results fromqueryServerLog(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)
-
Field Summary
Fields Modifier and Type Field Description static int
ALL_RECORDS
Value for themaximumNumberOfResults
parameter toqueryServerLog(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.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 indexstartIndex
.
-
-
-
Field Detail
-
LOWEST_SUPPORTED_QUERY_LEVEL
static final String LOWEST_SUPPORTED_QUERY_LEVEL
The lowest supported log level for which queries may be performed.
-
ALL_RECORDS
static final int ALL_RECORDS
Value for themaximumNumberOfResults
parameter toqueryServerLog(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.- See Also:
- Constant Field Values
-
FIRST_RECORD
static final int FIRST_RECORD
Value for thestartIndex
parameter toqueryServerLog(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)
.- See Also:
- Constant Field Values
-
LAST_RECORD
static final int LAST_RECORD
Value for thestartIndex
parameter toqueryServerLog(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)
.- See Also:
- Constant Field Values
-
-
Method Detail
-
queryServerLog
@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)
Query a server log file for records beginning at indexstartIndex
.The
name
parameter may beLogFileAccess.MOST_RECENT_NAME
to query the current server log file, or may be any specific server log file as returned byLogFileAccess.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 specifysearchForward=false
.If
searchForward
is true, then log records beginning withstartRecord
(inclusive) and later are considered by the query.
IfsearchForward
is false, then log records beginning atstartRecord - 1
and earlier are considered by the query.Because a log file could be deleted
QUESTIONS TO RESOLVE
- What are the legal keys and values of 'nameValueMap'
- Parameters:
name
- a specific log file name orLogFileAccess.MOST_RECENT_NAME
startIndex
- the location within the LogFile to begin.searchForward
- true to move forward, false to move backward fromstartIndex
maxRecords
- 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, seeLevel
modules
- one or more modules as defined inLogModuleNames
or any valid Logger namenameValuePairs
- name-value pairs to match. Names need not be unique.- Returns:
- LogQueryResult when using AMX client proxy. Actual type returned from the MBean is List<Serializable[]> The first Serializable[] is a String[] which contains the field names. Subsequent Serializable[] each represent a log record with each element representing a field within that log record.
- See Also:
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 for the order of values in the Object[]. Clients with access to the class can use
-
getDiagnosticCauses
@ManagedOperation(impact=0) String[] getDiagnosticCauses(@Param(name="messageID") String messageID, @Param(name="moduleName") String moduleName)
-
getDiagnosticChecks
@ManagedOperation(impact=0) String[] getDiagnosticChecks(@Param(name="messageID") String messageID, @Param(name="moduleName") String moduleName)
-
-