| java.lang.Object org.apache.log.output.AbstractTarget
All known Subclasses: org.apache.log.output.db.AbstractJDBCTarget, org.apache.log.output.jms.AbstractJMSTarget, org.apache.log.output.AsyncLogTarget, org.apache.log.output.MemoryTarget, org.apache.log.output.AbstractOutputTarget,
Method Summary | |
public synchronized void | close() Shutdown target. | abstract protected void | doProcessEvent(LogEvent event) Process a log event, via formatting and outputting it. | final protected void | error(String message, Throwable throwable) Helper method to write error messages to error handler. | final protected ErrorHandler | getErrorHandler() Helper method to retrieve ErrorHandler for subclasses. | protected synchronized boolean | isOpen() Return the open state of the target. | protected synchronized void | open() Startup log session. | public synchronized void | processEvent(LogEvent event) Process a log event, via formatting and outputting it. | public synchronized void | setErrorHandler(ErrorHandler errorHandler) Provide component with ErrorHandler. |
AbstractTarget | public AbstractTarget()(Code) | | AbstractTarget constructor.
|
AbstractTarget | public AbstractTarget(ErrorHandler errorHandler)(Code) | | AbstractTarget constructor.
Parameters: errorHandler - the error handler |
close | public synchronized void close()(Code) | | Shutdown target.
Attempting to write to target after close() will cause errors to be logged.
|
doProcessEvent | abstract protected void doProcessEvent(LogEvent event) throws Exception(Code) | | Process a log event, via formatting and outputting it.
This should be overidden by subclasses.
Parameters: event - the log event exception: Exception - if an event processing error occurs |
error | final protected void error(String message, Throwable throwable)(Code) | | Helper method to write error messages to error handler.
Parameters: message - the error message Parameters: throwable - the exception if any |
getErrorHandler | final protected ErrorHandler getErrorHandler()(Code) | | Helper method to retrieve ErrorHandler for subclasses.
the ErrorHandler |
isOpen | protected synchronized boolean isOpen()(Code) | | Return the open state of the target.
TRUE if the target is open else FALSE |
open | protected synchronized void open()(Code) | | Startup log session.
|
processEvent | public synchronized void processEvent(LogEvent event)(Code) | | Process a log event, via formatting and outputting it.
Parameters: event - the log event |
setErrorHandler | public synchronized void setErrorHandler(ErrorHandler errorHandler)(Code) | | Provide component with ErrorHandler.
Parameters: errorHandler - the errorHandler |
|
|