|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log.output.AbstractTarget
Abstract target.
Constructor Summary | |
AbstractTarget()
AbstractTarget constructor. |
|
AbstractTarget(ErrorHandler errorHandler)
AbstractTarget constructor. |
Method Summary | |
void |
close()
Shutdown target. |
protected abstract void |
doProcessEvent(LogEvent event)
Process a log event, via formatting and outputting it. |
protected void |
error(String message,
Throwable throwable)
Deprecated. Use getErrorHandler().error(...) directly |
protected ErrorHandler |
getErrorHandler()
Helper method to retrieve ErrorHandler for subclasses. |
protected boolean |
isOpen()
Return the open state of the target. |
protected void |
open()
Startup log session. |
void |
processEvent(LogEvent event)
Process a log event, via formatting and outputting it. |
void |
setErrorHandler(ErrorHandler errorHandler)
Provide component with ErrorHandler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractTarget()
public AbstractTarget(ErrorHandler errorHandler)
errorHandler
- the error handlerMethod Detail |
public void setErrorHandler(ErrorHandler errorHandler)
setErrorHandler
in interface ErrorAware
errorHandler
- the errorHandlerprotected boolean isOpen()
protected void open()
public void processEvent(LogEvent event)
processEvent
in interface LogTarget
event
- the log eventprotected abstract void doProcessEvent(LogEvent event) throws Exception
event
- the log event
Exception
- if an event processing error occurspublic void close()
protected final ErrorHandler getErrorHandler()
protected final void error(String message, Throwable throwable)
message
- the error messagethrowable
- the exception if any
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |