Package org.apache.log4j
Class AppenderSkeleton.NoOpErrorHandler
java.lang.Object
org.apache.log4j.AppenderSkeleton.NoOpErrorHandler
- All Implemented Interfaces:
ErrorHandler
- Enclosing class:
AppenderSkeleton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is normally used to just print the error message passed as a parameter.voidEquivalent to theErrorHandler.error(String, Exception, int, LoggingEvent)with the event parameter set tonull.voiderror(String message, Exception e, int errorCode, LoggingEvent event) This method is invoked to handle the error.voidsetAppender(Appender appender) Set the appender for which errors are handled.voidsetBackupAppender(Appender appender) Set the appender to fallback upon in case of failure.voidAdd a reference to a logger to which the failing appender might be attached to.
-
Constructor Details
-
NoOpErrorHandler
public NoOpErrorHandler()
-
-
Method Details
-
setLogger
Description copied from interface:ErrorHandlerAdd a reference to a logger to which the failing appender might be attached to. The failing appender will be searched and replaced only in the loggers you add through this method.- Specified by:
setLoggerin interfaceErrorHandler- Parameters:
logger- One of the loggers that will be searched for the failing appender in view of replacement.
-
error
Description copied from interface:ErrorHandlerEquivalent to theErrorHandler.error(String, Exception, int, LoggingEvent)with the event parameter set tonull.- Specified by:
errorin interfaceErrorHandler- Parameters:
message- The message associated with the error.e- The Exception that was thrown when the error occurred.errorCode- The error code associated with the error.
-
error
Description copied from interface:ErrorHandlerThis method is normally used to just print the error message passed as a parameter.- Specified by:
errorin interfaceErrorHandler- Parameters:
message- The message associated with the error.
-
error
Description copied from interface:ErrorHandlerThis method is invoked to handle the error.- Specified by:
errorin interfaceErrorHandler- Parameters:
message- The message associated with the error.e- The Exception that was thrown when the error occurred.errorCode- The error code associated with the error.event- The logging event that the failing appender is asked to log.
-
setAppender
Description copied from interface:ErrorHandlerSet the appender for which errors are handled. This method is usually called when the error handler is configured.- Specified by:
setAppenderin interfaceErrorHandler- Parameters:
appender- The appender
-
setBackupAppender
Description copied from interface:ErrorHandlerSet the appender to fallback upon in case of failure.- Specified by:
setBackupAppenderin interfaceErrorHandler- Parameters:
appender- The backup appender
-