| |
|
| java.lang.Object org.apache.log.output.AbstractTarget org.apache.log.output.AsyncLogTarget
AsyncLogTarget | public class AsyncLogTarget extends AbstractTarget implements Runnable(Code) | | An asynchronous LogTarget that sends entries on in another thread.
It is the responsibility of the user of this class to start
the thread etc.
LogTarget mySlowTarget = ...;
AsyncLogTarget asyncTarget = new AsyncLogTarget( mySlowTarget );
Thread thread = new Thread( asyncTarget );
thread.setPriority( Thread.MIN_PRIORITY );
thread.start();
logger.setLogTargets( new LogTarget[] { asyncTarget } );
author: Avalon Development Team author: Peter Donald |
AsyncLogTarget | public AsyncLogTarget(LogTarget logTarget)(Code) | | Creation of a new async log target.
Parameters: logTarget - the underlying target |
AsyncLogTarget | public AsyncLogTarget(LogTarget logTarget, int queueSize)(Code) | | Creation of a new async log target.
Parameters: logTarget - the underlying target Parameters: queueSize - the queue size |
doProcessEvent | public void doProcessEvent(LogEvent event)(Code) | | Process a log event by adding it to queue.
Parameters: event - the log event |
run | public void run()(Code) | | Thread startup.
|
setErrorHandler | public synchronized void setErrorHandler(ErrorHandler errorHandler)(Code) | | Provide component with ErrorHandler.
Parameters: errorHandler - the errorHandler |
|
|
|