|
Log4j 1.2.13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.log4j.varia.FallbackErrorHandler
The FallbackErrorHandler implements the ErrorHandler
interface such that a secondary appender may be specified. This
secondary appender takes over if the primary appender fails for
whatever reason.
The error message is printed on System.err, and
logged in the new secondary appender.
| Constructor Summary | |
FallbackErrorHandler()
|
|
| 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. |
void |
error(String message,
Exception e,
int errorCode,
LoggingEvent event)
Prints the message and the stack trace of the exception on System.err. |
void |
setAppender(Appender primary)
The appender to which this error handler is attached. |
void |
setBackupAppender(Appender backup)
Set the backup appender. |
void |
setLogger(Logger logger)
Adds the logger passed as parameter to the list of loggers that we need to search for in case of appender failure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FallbackErrorHandler()
| Method Detail |
public void setLogger(Logger logger)
setLogger in interface ErrorHandlerorg.apache.log4j.spi.ErrorHandlerlogger - One of the loggers that will be searched for the failing
appender in view of replacement.public void activateOptions()
activateOptions in interface OptionHandler
public void error(String message,
Exception e,
int errorCode)
System.err.error in interface ErrorHandler
public void error(String message,
Exception e,
int errorCode,
LoggingEvent event)
System.err.error in interface ErrorHandlerorg.apache.log4j.spi.ErrorHandlermessage - The message assoicated with the error.e - The Exption that was thrown when the error occured.errorCode - The error code associated with the error.event - The logging event that the failing appender is asked
to log.public void error(String message)
System.err.error in interface ErrorHandlerpublic void setAppender(Appender primary)
setAppender in interface ErrorHandlerpublic void setBackupAppender(Appender backup)
setBackupAppender in interface ErrorHandler
|
Log4j 1.2.13 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||