public class DefaultErrorHandler extends Object implements ErrorHandler
ErrorHandler
implementation falling back to StatusLogger
.
It avoids flooding the StatusLogger
by allowing either the first 3 errors or errors once every 5 minutes.
Constructor and Description |
---|
DefaultErrorHandler(Appender appender) |
Modifier and Type | Method and Description |
---|---|
void |
error(String msg)
Handle an error with a message.
|
void |
error(String msg,
LogEvent event,
Throwable error)
Handle an error with a message, an exception, and a logging event.
|
void |
error(String msg,
Throwable error)
Handle an error with a message and an exception.
|
Appender |
getAppender() |
public DefaultErrorHandler(Appender appender)
public void error(String msg)
error
in interface ErrorHandler
msg
- a messagepublic void error(String msg, Throwable error)
error
in interface ErrorHandler
msg
- a messageerror
- a Throwable
public void error(String msg, LogEvent event, Throwable error)
error
in interface ErrorHandler
msg
- a messageevent
- a LogEvent
error
- a Throwable
public Appender getAppender()
Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.