|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.sharedutil.logging.ExceptionFilter
public class ExceptionFilter
Defines a logging Filter that logs exceptions at a different logging
level from other logging. This filter selects log records that contain an
exception of a specified type, and otherwise requires the record to have a
particular logging level.
This class recognizes the following LogManager configuration
properties:
java.lang.Throwable
INFO
For example, to use this class to log records to the console that throw
TransactionAbortedException at FINEST and all other messages
at WARNING, put the following text in the logging configuration
file:
.level=FINEST handlers=java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=FINEST java.util.logging.ConsoleHandler.filter=com.sun.sgs.impl.sharedutil.logging.ExceptionFilter com.sun.sgs.impl.sharedutil.logging.ExceptionFilter.exception=com.sun.sgs.app.TransactionAbortedException com.sun.sgs.impl.sharedutil.logging.ExceptionFilter.level=WARNING
| Field Summary | |
|---|---|
static String |
EXCEPTION_CLASS_PROPERTY
The property that specifies the exception class. |
static String |
LEVEL_PROPERTY
The property that specifies the logging level for log records that do not contain an exception of the specified exception class. |
| Constructor Summary | |
|---|---|
ExceptionFilter()
Creates an instance of this class. |
|
| Method Summary | |
|---|---|
boolean |
isLoggable(LogRecord record)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EXCEPTION_CLASS_PROPERTY
public static final String LEVEL_PROPERTY
| Constructor Detail |
|---|
public ExceptionFilter()
throws ClassNotFoundException
ClassNotFoundException - if the exception class is not found| Method Detail |
|---|
public boolean isLoggable(LogRecord record)
This implementation returns true if the log record contains an exception that is a subclass of the class specified by the "com.sun.sgs.impl.sharedutil.logging.ExceptionFilter.exception" log manager property, or if the level of the record is greater than or equal to the logging level specified by the "com.sun.sgs.impl.sharedutil.logging.ExceptionFilter.level" property.
isLoggable in interface Filter
|
Project Darkstar, Version 0.9.9.5 2013-07-29 20:53:43 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||