Methods Summary |
---|
public void | activateOptions()No options to activate.
|
public void | error(java.lang.String message, java.lang.Exception e, int errorCode)Prints the message and the stack trace of the exception on
System.err .
error(message, e, errorCode, null);
|
public void | error(java.lang.String message, java.lang.Exception e, int errorCode, org.apache.log4j.spi.LoggingEvent event)Prints the message and the stack trace of the exception on
System.err .
LogLog.debug("FB: The following error reported: " + message, e);
LogLog.debug("FB: INITIATING FALLBACK PROCEDURE.");
if (loggers != null) {
for(int i = 0; i < loggers.size(); i++) {
Logger l = (Logger) loggers.elementAt(i);
LogLog.debug("FB: Searching for ["+primary.getName()+"] in logger ["
+l.getName() + "].");
LogLog.debug("FB: Replacing ["+primary.getName()+"] by ["
+ backup.getName() + "] in logger ["+ l.getName() +"].");
l.removeAppender(primary);
LogLog.debug("FB: Adding appender ["+backup.getName()+"] to logger "
+ l.getName());
l.addAppender(backup);
}
}
|
public void | error(java.lang.String message)Print a the error message passed as parameter on
System.err .
//if(firstTime) {
//LogLog.error(message);
//firstTime = false;
//}
|
public void | setAppender(org.apache.log4j.Appender primary)The appender to which this error handler is attached.
LogLog.debug("FB: Setting primary appender to [" + primary.getName() + "].");
this.primary = primary;
|
public void | setBackupAppender(org.apache.log4j.Appender backup)Set the backup appender.
LogLog.debug("FB: Setting backup appender to [" + backup.getName() + "].");
this.backup = backup;
|
public void | setLogger(org.apache.log4j.Logger logger)Adds the logger passed as parameter to the list of
loggers that we need to search for in case of appender failure.
LogLog.debug("FB: Adding logger [" + logger.getName() + "].");
if(loggers == null) {
loggers = new Vector();
}
loggers.addElement(logger);
|