org.apache.tools.ant.taskdefs

Class LogOutputStream

public class LogOutputStream extends LineOrientedOutputStream

Logs each line written to this stream to the log system of ant. Tries to be smart about line separators.

Since: Ant 1.2

Constructor Summary
LogOutputStream(Task task, int level)
Creates a new instance of this class.
LogOutputStream(ProjectComponent pc, int level)
Creates a new instance of this class.
Method Summary
intgetMessageLevel()
Get the level.
protected voidprocessBuffer()
Converts the buffer to a string and sends it to processLine
protected voidprocessLine(String line)
Logs a line to the log system of ant.
protected voidprocessLine(String line, int level)
Logs a line to the log system of ant.

Constructor Detail

LogOutputStream

public LogOutputStream(Task task, int level)
Creates a new instance of this class.

Parameters: task the task for whom to log level loglevel used to log data written to this stream.

LogOutputStream

public LogOutputStream(ProjectComponent pc, int level)
Creates a new instance of this class.

Parameters: pc the project component for whom to log level loglevel used to log data written to this stream.

Since: Ant 1.6.3

Method Detail

getMessageLevel

public int getMessageLevel()
Get the level.

Returns: the log level.

processBuffer

protected void processBuffer()
Converts the buffer to a string and sends it to processLine

processLine

protected void processLine(String line)
Logs a line to the log system of ant.

Parameters: line the line to log.

processLine

protected void processLine(String line, int level)
Logs a line to the log system of ant.

Parameters: line the line to log. level the logging level to use.