org.ceryle.util
Class MessageWriterAppender.MWErrorHandler

java.lang.Object
  extended by org.ceryle.util.MessageWriterAppender.MWErrorHandler
All Implemented Interfaces:
org.apache.log4j.spi.ErrorHandler, org.apache.log4j.spi.OptionHandler
Enclosing class:
MessageWriterAppender

protected class MessageWriterAppender.MWErrorHandler
extends Object
implements org.apache.log4j.spi.ErrorHandler

A quick and dirty inner class to implement ErrorHandler, which just spits its output to the underlying MessageWriter.


Constructor Summary
protected MessageWriterAppender.MWErrorHandler()
           
 
Method Summary
 void activateOptions()
          Does nothing.
 void error(String message)
          This method is normally used to just print the error message passed as a parameter.
 void error(String message, Exception e, int errorCode)
          Equivalent to the error(String, Exception, int, LoggingEvent event) with the the event parameteter set to null.
 void error(String message, Exception e, int errorCode, org.apache.log4j.spi.LoggingEvent event)
          This method is invoked to handle the error.
 void setAppender(org.apache.log4j.Appender appender)
          Set the appender for which errors are handled.
 void setBackupAppender(org.apache.log4j.Appender appender)
          Set the appender to falkback upon in case of failure.
 void setLogger(org.apache.log4j.Logger logger)
          Add a reference to a logger to which the failing appender might be attached to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageWriterAppender.MWErrorHandler

protected MessageWriterAppender.MWErrorHandler()
Method Detail

error

public void error(String message)
This method is normally used to just print the error message passed as a parameter.

Specified by:
error in interface org.apache.log4j.spi.ErrorHandler

error

public void error(String message,
                  Exception e,
                  int errorCode)
Equivalent to the error(String, Exception, int, LoggingEvent event) with the the event parameteter set to null.

Specified by:
error in interface org.apache.log4j.spi.ErrorHandler

error

public void error(String message,
                  Exception e,
                  int errorCode,
                  org.apache.log4j.spi.LoggingEvent event)
This method is invoked to handle the error.

Specified by:
error in interface org.apache.log4j.spi.ErrorHandler

setAppender

public void setAppender(org.apache.log4j.Appender appender)
Set the appender for which errors are handled. This doesn't actually do anything.

Specified by:
setAppender in interface org.apache.log4j.spi.ErrorHandler

setBackupAppender

public void setBackupAppender(org.apache.log4j.Appender appender)
Set the appender to falkback upon in case of failure. This doesn't actually do anything.

Specified by:
setBackupAppender in interface org.apache.log4j.spi.ErrorHandler

setLogger

public void setLogger(org.apache.log4j.Logger logger)
Add a reference to a logger to which the failing appender might be attached to. This doesn't actually do anything.

Specified by:
setLogger in interface org.apache.log4j.spi.ErrorHandler

activateOptions

public void activateOptions()
Does nothing.

Specified by:
activateOptions in interface org.apache.log4j.spi.OptionHandler


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.