FileDocCategorySizeDatePackage
LogStreamHandler.javaAPI DocApache Ant 1.702260Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs

LogStreamHandler

public class LogStreamHandler extends PumpStreamHandler
Logs standard output and error of a subprocess to the log system of ant.
since
Ant 1.2

Fields Summary
Constructors Summary
public LogStreamHandler(org.apache.tools.ant.Task task, int outlevel, int errlevel)
Creates log stream handler

param
task the task for whom to log
param
outlevel the loglevel used to log standard output
param
errlevel the loglevel used to log standard error

        this((ProjectComponent) task, outlevel, errlevel);
    
public LogStreamHandler(org.apache.tools.ant.ProjectComponent pc, int outlevel, int errlevel)
Creates log stream handler

param
pc the project component for whom to log
param
outlevel the loglevel used to log standard output
param
errlevel the loglevel used to log standard error

        super(new LogOutputStream(pc, outlevel),
              new LogOutputStream(pc, errlevel));
    
Methods Summary
public voidstop()
Stop the log stream handler.

        super.stop();
        try {
            getErr().close();
            getOut().close();
        } catch (IOException e) {
            // plain impossible
            throw new BuildException(e);
        }