|
Apache Log4cxx
Version 2.0.0
|
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>
Public Member Functions | |
| OnlyOnceErrorHandler () | |
| ~OnlyOnceErrorHandler () | |
| void | setLogger (const LoggerPtr &logger) override |
| Does not do anything. | |
| void | setOption (const LogString &option, const LogString &value) override |
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. | |
| void | error (const LogString &message, const std::exception &e, int errorCode, const spi::LoggingEventPtr &event) const override |
Prints the message and the stack trace of the exception on System.err. | |
| void | error (const LogString &message) const override |
Print a the error message passed as parameter on System.err. | |
| void | setAppender (const AppenderPtr &appender) override |
| Does not do anything. | |
| void | setBackupAppender (const AppenderPtr &appender) override |
| Does not do anything. | |
| bool | errorReported () const override |
| Has an error been reported? | |
| Public Member Functions inherited from log4cxx::spi::ErrorHandler | |
| virtual | ~ErrorHandler () |
| virtual void | addAppenderHolder (const LogString &name, const AppenderAttachablePtr &clx) |
Add clx to the list of collections to search for the failed appender. | |
| void | activateOptions () override |
| Activate the options that were previously set with calls to option setters. | |
| void | activateOptions (helpers::Pool &) |
| Public Member Functions inherited from log4cxx::spi::OptionHandler | |
| virtual | ~OptionHandler () |
| void | activateOptions (helpers::Pool &) |
| Public Member Functions inherited from log4cxx::helpers::Object | |
| virtual | ~Object () |
| virtual const helpers::Class & | getClass () const =0 |
| virtual bool | instanceof (const Class &clazz) const =0 |
| virtual const void * | cast (const Class &clazz) const =0 |
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
| log4cxx::helpers::OnlyOnceErrorHandler::OnlyOnceErrorHandler | ( | ) |
| log4cxx::helpers::OnlyOnceErrorHandler::~OnlyOnceErrorHandler | ( | ) |
|
overridevirtual |
Print a the error message passed as parameter on System.err.
Implements log4cxx::spi::ErrorHandler.
|
overridevirtual |
Prints the message and the stack trace of the exception on System.err.
Implements log4cxx::spi::ErrorHandler.
|
overridevirtual |
Prints the message and the stack trace of the exception on System.err.
Implements log4cxx::spi::ErrorHandler.
|
overridevirtual |
Has an error been reported?
Implements log4cxx::spi::ErrorHandler.
|
overridevirtual |
Does not do anything.
Implements log4cxx::spi::ErrorHandler.
|
overridevirtual |
Does not do anything.
Implements log4cxx::spi::ErrorHandler.
|
overridevirtual |
Does not do anything.
Implements log4cxx::spi::ErrorHandler.
|
overridevirtual |
Set option to value.
| Supported options | Supported values | Default value |
|---|---|---|
| - | - | - |
Reimplemented from log4cxx::spi::OptionHandler.