Classes | Public Member Functions | Static Public Member Functions

OnlyOnceErrorHandler Class Reference

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...

Inherits log4cxx::spi::ErrorHandler, and log4cxx::helpers::ObjectImpl.

List of all members.

Classes

class  ClazzOnlyOnceErrorHandler

Public Member Functions

virtual const helpers::ClassgetClass () const
const void * cast (const helpers::Class &clazz) const
bool instanceof (const helpers::Class &clazz) const
 OnlyOnceErrorHandler ()
void addRef () const
void releaseRef () const
void setLogger (const LoggerPtr &logger)
 Does not do anything.
void activateOptions (log4cxx::helpers::Pool &p)
 No options to activate.
void setOption (const LogString &option, const LogString &value)
void error (const LogString &message, const std::exception &e, int errorCode) const
 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
 Prints the message and the stack trace of the exception on System.err.
void error (const LogString &message) const
 Print a the error message passed as parameter on System.err.
void setAppender (const AppenderPtr &appender)
 Does not do anything.
void setBackupAppender (const AppenderPtr &appender)
 Does not do anything.

Static Public Member Functions

static const helpers::ClassgetStaticClass ()
static const
log4cxx::helpers::ClassRegistration
registerClass ()

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


Member Function Documentation

void activateOptions ( log4cxx::helpers::Pool p  ) 

No options to activate.

void addRef (  )  const [virtual]

Reimplemented from ObjectImpl.

const void* cast ( const helpers::Class clazz  )  const [inline, virtual]

Implements Object.

void error ( const LogString message,
const std::exception &  e,
int  errorCode 
) const

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

Prints the message and the stack trace of the exception on System.err.

void error ( const LogString message  )  const

Print a the error message passed as parameter on System.err.

virtual const helpers::Class& getClass (  )  const [virtual]

Reimplemented from Object.

static const helpers::Class& getStaticClass (  )  [static]

Reimplemented from Object.

bool instanceof ( const helpers::Class clazz  )  const [inline, virtual]

Implements Object.

static const log4cxx::helpers::ClassRegistration& registerClass (  )  [static]

Reimplemented from Object.

void releaseRef (  )  const [virtual]

Reimplemented from ObjectImpl.

void setAppender ( const AppenderPtr appender  ) 

Does not do anything.

void setBackupAppender ( const AppenderPtr appender  ) 

Does not do anything.

void setLogger ( const LoggerPtr logger  ) 

Does not do anything.

void setOption ( const LogString option,
const LogString value 
)

The documentation for this class was generated from the following file: