Package org.apache.log4j.bridge
Class ErrorHandlerAdapter
- java.lang.Object
-
- org.apache.log4j.bridge.ErrorHandlerAdapter
-
- All Implemented Interfaces:
ErrorHandler
public class ErrorHandlerAdapter extends Object implements ErrorHandler
Makes a Log4j 1 ErrorHandler usable by a Log4j 2 Appender.
-
-
Constructor Summary
Constructors Constructor Description ErrorHandlerAdapter(ErrorHandler errorHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(String msg)Handle an error with a message.voiderror(String msg, Throwable t)Handle an error with a message and an exception.voiderror(String msg, LogEvent event, Throwable t)Handle an error with a message, and exception and a logging event.ErrorHandlergetHandler()
-
-
-
Constructor Detail
-
ErrorHandlerAdapter
public ErrorHandlerAdapter(ErrorHandler errorHandler)
-
-
Method Detail
-
getHandler
public ErrorHandler getHandler()
-
error
public void error(String msg)
Description copied from interface:ErrorHandlerHandle an error with a message.- Specified by:
errorin interfaceErrorHandler- Parameters:
msg- The message.
-
error
public void error(String msg, Throwable t)
Description copied from interface:ErrorHandlerHandle an error with a message and an exception.- Specified by:
errorin interfaceErrorHandler- Parameters:
msg- The message.t- The Throwable.
-
error
public void error(String msg, LogEvent event, Throwable t)
Description copied from interface:ErrorHandlerHandle an error with a message, and exception and a logging event.- Specified by:
errorin interfaceErrorHandler- Parameters:
msg- The message.event- The LogEvent.t- The Throwable.
-
-