org.apache.log4j.helpers
Class OnlyOnceErrorHandler
- ErrorHandler, OptionHandler
public class OnlyOnceErrorHandler
The
OnlyOnceErrorHandler
implements log4j'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.
void | activateOptions() - No options to activate.
|
void | error(String message) - Print a the error message passed as parameter on
System.err .
|
void | error(String message, Exception e, int errorCode) - Prints the message and the stack trace of the exception on
System.err .
|
void | error(String message, Exception e, int errorCode, LoggingEvent event) - Prints the message and the stack trace of the exception on
System.err .
|
void | setAppender(Appender appender) - Does not do anything.
|
void | setBackupAppender(Appender appender) - Does not do anything.
|
void | setLogger(Logger logger) - Does not do anything.
|
error
public void error(String message)
Print a the error message passed as parameter on
System.err
.
- error in interface ErrorHandler
error
public void error(String message,
Exception e,
int errorCode)
Prints the message and the stack trace of the exception on
System.err
.
- error in interface ErrorHandler
error
public void error(String message,
Exception e,
int errorCode,
LoggingEvent event)
Prints the message and the stack trace of the exception on
System.err
.
- error in interface ErrorHandler
Copyright 2000-2005 Apache Software Foundation.