The OnlyOnceErrorHandler implements log4cxx's default error handling policy which consists of emitting a message for the first error in an appender and ignoring all following errors.
More...
#include <onlyonceerrorhandler.h>
Inheritance diagram for log4cxx::helpers::OnlyOnceErrorHandler:
Does not do anything.
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.
Does not do anything.
Does not do anything.
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 OnlyOnceErrorHandler implements log4cxx's default error handling policy which consists of emitting a message for the first error in an appender and ignoring all following errors.
The error message is printed on System.err.
This policy aims at protecting an otherwise working application from being flooded with error messages when logging fails
Constructor & Destructor Documentation
◆ OnlyOnceErrorHandler()
log4cxx::helpers::OnlyOnceErrorHandler::OnlyOnceErrorHandler
(
)
◆ ~OnlyOnceErrorHandler()
log4cxx::helpers::OnlyOnceErrorHandler::~OnlyOnceErrorHandler
(
)
Member Function Documentation
◆ activateOptions()
void log4cxx::helpers::OnlyOnceErrorHandler::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::helpers::OnlyOnceErrorHandler::error
(
const
LogString &
message )
const
overridevirtual |
◆ error() [2/3]
void log4cxx::helpers::OnlyOnceErrorHandler::error
(
const
LogString &
message,
const std::exception &
e,
int
errorCode
)
const
overridevirtual |
◆ error() [3/3]
void log4cxx::helpers::OnlyOnceErrorHandler::error
(
const
LogString &
message,
const std::exception &
e,
int
errorCode,
)
const
overridevirtual |
◆ errorReported()
bool log4cxx::helpers::OnlyOnceErrorHandler::errorReported
(
)
const
Has an error been reported?
◆ setAppender()
void log4cxx::helpers::OnlyOnceErrorHandler::setAppender
(
const
AppenderPtr &
appender )
overridevirtual |
◆ setBackupAppender()
void log4cxx::helpers::OnlyOnceErrorHandler::setBackupAppender
(
const
AppenderPtr &
appender )
overridevirtual |
◆ setLogger()
void log4cxx::helpers::OnlyOnceErrorHandler::setLogger
(
const
LoggerPtr &
logger )
overridevirtual |
◆ setOption()
void log4cxx::helpers::OnlyOnceErrorHandler::setOption
(
const
LogString &
option,
)
overridevirtual |
The documentation for this class was generated from the following file: