|
Log4j 0.9.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.log4j.helpers.OnlyOnceErrorHandler
The OnlyOnceErrorHandler
implements log4j's default
error handling policy which consists of emitting a message for the
first error in an appender and ignoring all following errors.
The error message is printed on System.err
.
This policy aims at a protecting an otherwise working application from being flooded with error messages when logging fails.
Constructor Summary | |
OnlyOnceErrorHandler()
|
Method Summary | |
void |
activateOptions()
No options to activate. |
void |
error(String message)
Print a the error message passed as parameter on System.err . |
void |
error(String message,
Exception e,
int errorCode)
Prints the message and the stack trace of the exception on System.err . |
String[] |
getOptionStrings()
Returns null as OnlyOnceErrorHandler
has no options. |
void |
setOption(String key,
String value)
No options to set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OnlyOnceErrorHandler()
Method Detail |
public void activateOptions()
activateOptions
in interface OptionHandler
public void error(String message, Exception e, int errorCode)
System.err
.error
in interface ErrorHandler
org.log4j.spi.ErrorHandler
message
- The message assoicated with the error.e
- The Exption that was thrown when the error occured.errorCode
- The error code associated with the error.public String[] getOptionStrings()
null
as OnlyOnceErrorHandler
has no options.getOptionStrings
in interface OptionHandler
public void setOption(String key, String value)
setOption
in interface OptionHandler
public void error(String message)
System.err
.error
in interface ErrorHandler
|
Log4j 0.9.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |