org.apache.log.output
Class AbstractTarget
java.lang.Object
org.apache.log.output.AbstractTarget
- ErrorAware, LogTarget
public abstract class AbstractTarget
extends java.lang.Object
Abstract target.
- Avalon Development Team
- Peter Donald
void | close() - Shutdown target.
|
protected void | doProcessEvent(LogEvent event) - Process a log event, via formatting and outputting it.
|
protected void | error(String message, Throwable throwable) - 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.
|
AbstractTarget
public AbstractTarget()
AbstractTarget constructor.
AbstractTarget
public AbstractTarget(ErrorHandler errorHandler)
AbstractTarget constructor.
errorHandler
- the error handler
close
public void close()
Shutdown target.
Attempting to write to target after close() will cause errors to be logged.
doProcessEvent
protected void doProcessEvent(LogEvent event)
throws Exception
Process a log event, via formatting and outputting it.
This should be overidden by subclasses.
event
- the log event
error
protected final void error(String message,
Throwable throwable)
Use getErrorHandler().error(...) directly
Helper method to write error messages to error handler.
message
- the error messagethrowable
- the exception if any
getErrorHandler
protected final ErrorHandler getErrorHandler()
Helper method to retrieve ErrorHandler for subclasses.
- the ErrorHandler
isOpen
protected boolean isOpen()
Return the open state of the target.
- TRUE if the target is open else FALSE
open
protected void open()
Startup log session.
processEvent
public void processEvent(LogEvent event)
Process a log event, via formatting and outputting it.
- processEvent in interface LogTarget
event
- the log event
"Copyright B) 2001 Apache Jakarta Project. All Rights Reserved."