Save This Page
Home » slf4j-1.5.5 » org.apache » log4j » varia » [javadoc | source]
org.apache.log4j.varia
public class: FallbackErrorHandler [javadoc | source]
java.lang.Object
   org.apache.log4j.varia.FallbackErrorHandler

All Implemented Interfaces:
    ErrorHandler

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.

Field Summary
 Appender backup     
 Appender primary     
 Vector loggers     
Constructor:
 public FallbackErrorHandler() 
Method from org.apache.log4j.varia.FallbackErrorHandler Summary:
activateOptions,   error,   error,   error,   setAppender,   setBackupAppender,   setLogger
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.log4j.varia.FallbackErrorHandler Detail:
 public  void activateOptions() 
    No options to activate.
 public  void error(String message) 
    Print a the error message passed as parameter on System.err.
 public  void error(String message,
    Exception e,
    int errorCode) 
    Prints the message and the stack trace of the exception on System.err.
 public  void error(String message,
    Exception e,
    int errorCode,
    LoggingEvent event) 
    Prints the message and the stack trace of the exception on System.err.
 public  void setAppender(Appender primary) 
    The appender to which this error handler is attached.
 public  void setBackupAppender(Appender backup) 
    Set the backup appender.
 public  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.