|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LogAnalyzer
Provides summary information about important logging events. PRELIMINARY--SUBJECT TO CHANGES/ADDITIONS
Field Summary | |
---|---|
static String |
MODULE_NAME_KEY
Key into any Map returned from getErrorDistribution(long, java.lang.String) . |
static String |
SEVERE_COUNT_KEY
Key into any Map returned from getErrorInfo() . |
static String |
TIMESTAMP_KEY
Key into any Map returned from getErrorInfo() . |
static String |
WARNING_COUNT_KEY
Key into any Map returned from getErrorInfo() . |
Method Summary | |
---|---|
Map<String,Integer> |
getErrorDistribution(long timestamp,
String level)
Get the number of log entries for a particular timestamp of a particular Level
for all modules. |
Map<String,Number>[] |
getErrorInfo()
Get a summary of the Level.SEVERE and Level.WARNING log
entries for the known history. |
long |
getErrorStatisticsIntervalMinutes()
|
int |
getKeepErrorStatisticsForIntervals()
|
String[] |
getLoggerNames()
|
String[] |
getLoggerNamesUnder(String loggerName)
|
void |
setErrorStatisticsIntervalMinutes(long minutes)
Set the duration of an interval. |
void |
setKeepErrorStatisticsForIntervals(int numIntervals)
Set the number of intervals error statistics should be maintained. |
Field Detail |
---|
static final String TIMESTAMP_KEY
getErrorInfo()
.
value is of type Long.
static final String SEVERE_COUNT_KEY
getErrorInfo()
.
value is of type Long.
static final String WARNING_COUNT_KEY
getErrorInfo()
.
value is of type Long.
static final String MODULE_NAME_KEY
getErrorDistribution(long, java.lang.String)
.
value is of type String.
Method Detail |
---|
Map<String,Number>[] getErrorInfo()
Level.SEVERE
and Level.WARNING
log
entries for the known history. Each entry in the resulting array is a
Map with the following keys:
TIMESTAMP_KEY
of type LongSEVERE_COUNT_KEY
of type IntegerWARNING_COUNT_KEY
of type Integer
The timestamp obtained from each Map may be used as the timestamp when
calling getErrorDistribution(long, java.lang.String)
. For example:
final Map
for( int i = 0; i < infos.length; ++i ) {
final Map
final long timestamp = ((Long)info.get( TIMESTAMP_KEY )).longValue();
Map
}
Map<String,Integer> getErrorDistribution(long timestamp, String level)
Level
for all modules. SEVERE and WARNING are the only levels supported.
The resulting Map is keyed by the module ID, which may be any of the values
found in LogModuleNames
or any valid Logger name.
The corresponding value
is the count for that module of the requested level.
timestamp
- a timestamp as obtained using TIME_STAMP_KEY from one of the Maps
returned by getErrorInfo()
. Note that it is a 'long' not a 'Long' and is required.level
-
String[] getLoggerNames()
String[] getLoggerNamesUnder(String loggerName)
void setKeepErrorStatisticsForIntervals(int numIntervals)
numIntervals
- number of intervalsint getKeepErrorStatisticsForIntervals()
void setErrorStatisticsIntervalMinutes(long minutes)
minutes
- The duration of an interval in minutes.long getErrorStatisticsIntervalMinutes()
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.