The FallbackErrorHandler implements the ErrorHandler interface such that a secondary appender may be specified.
More...
#include <fallbackerrorhandler.h>
Inheritance diagram for log4cxx::varia::FallbackErrorHandler:
Adds the logger passed as parameter to the list of loggers that we need to search for in case of appender failure.
Activate the options that were previously set with calls to option setters.
Set option to value.
void
error (const
LogString &message, const std::exception &e, int errorCode) const override
Prints the message and the stack trace of the exception on System.err.
Prints the message and the stack trace of the exception on System.err.
Print a the error message passed as parameter on System.err.
The appender to which this error handler is attached.
Set the backup appender.
Has an error been reported?
Add a reference to a logger to which the failing appender might be attached to.
virtual void
error (const
LogString &message, const std::exception &e, int errorCode) const =0
Equivalent to the error(const String&, helpers::Exception&, int,
spi::LoggingEvent&) with the the event parameteter set to null.
This method is normally used to just print the error message passed as a parameter.
This method is invoked to handle the error.
Set the appender for which errors are handled.
Set the appender to fallback upon in case of failure.
Activate the options that were previously set with calls to option setters.
Set option to value.
virtual const void *
cast (const
Class &clazz) const =0
Detailed Description
The FallbackErrorHandler implements the ErrorHandler interface such that a secondary appender may be specified.
This secondary appender takes over if the primary appender fails for whatever reason.
The error message is printed on System.err, and logged in the new secondary appender.
Constructor & Destructor Documentation
◆ FallbackErrorHandler()
log4cxx::varia::FallbackErrorHandler::FallbackErrorHandler
(
)
◆ ~FallbackErrorHandler()
log4cxx::varia::FallbackErrorHandler::~FallbackErrorHandler
(
)
Member Function Documentation
◆ activateOptions()
void log4cxx::varia::FallbackErrorHandler::activateOptions
(
helpers::Pool &
p )
overridevirtual
Activate the options that were previously set with calls to option setters.
No action is performed in this implementation.
Implements log4cxx::spi::OptionHandler.
◆ error() [1/3]
void log4cxx::varia::FallbackErrorHandler::error
(
const
LogString &
)
const
inlineoverridevirtual
◆ error() [2/3]
void log4cxx::varia::FallbackErrorHandler::error
(
const
LogString &
message,
const std::exception &
e,
int
errorCode
)
const
overridevirtual
◆ error() [3/3]
void log4cxx::varia::FallbackErrorHandler::error
(
const
LogString &
message,
const std::exception &
e,
int
errorCode,
)
const
overridevirtual
◆ errorReported()
bool log4cxx::varia::FallbackErrorHandler::errorReported
(
)
const
Has an error been reported?
◆ setAppender()
void log4cxx::varia::FallbackErrorHandler::setAppender
(
const
AppenderPtr &
primary )
overridevirtual
◆ setBackupAppender()
void log4cxx::varia::FallbackErrorHandler::setBackupAppender
(
const
AppenderPtr &
backup )
overridevirtual
◆ setLogger()
void log4cxx::varia::FallbackErrorHandler::setLogger
(
const
LoggerPtr &
logger )
overridevirtual
Adds the logger passed as parameter to the list of loggers that we need to search for in case of appender failure.
Implements log4cxx::spi::ErrorHandler.
◆ setOption()
void log4cxx::varia::FallbackErrorHandler::setOption
(
const
LogString &
option,
)
overridevirtual
The documentation for this class was generated from the following file: