Class LogStreamHandler
java.lang.Object
org.apache.tools.ant.taskdefs.PumpStreamHandler
org.apache.tools.ant.taskdefs.LogStreamHandler
- All Implemented Interfaces:
ExecuteStreamHandler
Logs standard output and error of a subprocess to the log system of ant.
- Since:
- Ant 1.2
-
Nested Class Summary
Nested classes/interfaces inherited from class PumpStreamHandler
PumpStreamHandler.ThreadWithPumperModifier and TypeClassDescriptionprotected static classSpecialized subclass that allows access to the running StreamPumper. -
Constructor Summary
ConstructorsConstructorDescriptionLogStreamHandler(ProjectComponent pc, int outlevel, int errlevel) Creates log stream handlerLogStreamHandler(Task task, int outlevel, int errlevel) Creates log stream handler -
Method Summary
Methods inherited from class PumpStreamHandler
createProcessErrorPump, createProcessOutputPump, createPump, createPump, createPump, finish, getErr, getOut, setProcessErrorStream, setProcessInputStream, setProcessOutputStream, startModifier and TypeMethodDescriptionprotected voidCreate the pump to handle error output.protected voidCreate the pump to handle process output.protected ThreadcreatePump(InputStream is, OutputStream os) Creates a stream pumper to copy the given input stream to the given output stream.protected ThreadcreatePump(InputStream is, OutputStream os, boolean closeWhenExhausted) Creates a stream pumper to copy the given input stream to the given output stream.protected ThreadcreatePump(InputStream is, OutputStream os, boolean closeWhenExhausted, boolean nonBlockingIO) Creates a stream pumper to copy the given input stream to the given output stream.protected final voidWaits for a thread to finish while trying to make it finish quicker by stopping the pumper (if the thread is aThreadWithPumperinstance) or interrupting the thread.protected OutputStreamgetErr()Get the error stream.protected OutputStreamgetOut()Get the output stream.voidSet theInputStreamfrom which to read the standard error of the process.voidSet theOutputStreamby means of which input can be sent to the process.voidSet theInputStreamfrom which to read the standard output of the process.voidstart()Start theThreads.
-
Constructor Details
-
LogStreamHandler
Creates log stream handler- Parameters:
task- the task for whom to logoutlevel- the loglevel used to log standard outputerrlevel- the loglevel used to log standard error
-
LogStreamHandler
Creates log stream handler- Parameters:
pc- the project component for whom to logoutlevel- the loglevel used to log standard outputerrlevel- the loglevel used to log standard error
-
-
Method Details
-
stop
public void stop()Stop the log stream handler.- Specified by:
stopin interfaceExecuteStreamHandler- Overrides:
stopin classPumpStreamHandler
-