Fields Summary |
---|
public static final String | TIMESTAMP_KEYKey into any Map returned from {@link #getErrorInfo}.
value is of type Long. |
public static final String | SEVERE_COUNT_KEYKey into any Map returned from {@link #getErrorInfo}.
value is of type Long. |
public static final String | WARNING_COUNT_KEYKey into any Map returned from {@link #getErrorInfo}.
value is of type Long. |
public static final String | MODULE_NAME_KEYKey into any Map returned from {@link #getErrorDistribution}.
value is of type String. |
Methods Summary |
---|
public java.util.Map | getErrorDistribution(long timestamp, java.lang.String level)Get the number of log entries for a particular timestamp of a particular {@link 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 {@link LogModuleNames} or any valid Logger name.
The corresponding value
is the count for that module of the requested level.
|
public java.util.Map[] | getErrorInfo()Get a summary of the {@link Level#SEVERE} and {@link Level#WARNING} log
entries for the known history. Each entry in the resulting array is a
Map with the following keys:
- {@link #TIMESTAMP_KEY} of type Long
- {@link #SEVERE_COUNT_KEY} of type Integer
- {@link #WARNING_COUNT_KEY} of type Integer
The entries are arranged from oldest to newest with the last entry being
the most recent.
The timestamp obtained from each Map may be used as the timestamp when
calling {@link #getErrorDistribution}. For example:
final Map[] infos = logging.getErrorInfo();
for( int i = 0; i < infos.length; ++i ) {
final Map info = infos[ i ];
final long timestamp = ((Long)info.get( TIMESTAMP_KEY )).longValue();
Map counts = getErrorDistribution( timestamp );
}
|
public long | getErrorStatisticsIntervalMinutes()
|
public int | getKeepErrorStatisticsForIntervals()
|
public java.lang.String[] | getLoggerNames()
|
public java.lang.String[] | getLoggerNamesUnder(java.lang.String loggerName)
|
public void | setErrorStatisticsIntervalMinutes(long minutes)Set the duration of an interval.
|
public void | setKeepErrorStatisticsForIntervals(int numIntervals)Set the number of intervals error statistics should be maintained.
|