Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class LogOutputStream

extends LineOrientedOutputStream
Class Inheritance
Known Direct Subclasses
org.apache.tools.ant.taskdefs.Javadoc.JavadocOutputStream
Imports
java.io.IOException, org.apache.tools.ant.Project, .ProjectComponent, .Task, org.apache.tools.ant.util.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

Field Summary

Modifier and TypeField and Description
private int
private ProjectComponent

Constructor Summary

AccessConstructor and Description
public
LogOutputStream(ProjectComponent
the project component for whom to log
pc
)

Create a new LogOutputStream for the specified ProjectComponent.

public
LogOutputStream(Task
the task for whom to log
task
,
int
loglevel used to log data written to this stream.
level
)

Creates a new instance of this class.

public
LogOutputStream(ProjectComponent
the project component for whom to log
pc
,
int
loglevel used to log data written to this stream.
level
)

Creates a new instance of this class.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the log level.
getMessageLevel
()

Get the level.

protected void
processBuffer()

Overrides org.apache.tools.ant.util.LineOrientedOutputStream.processBuffer.

Converts the buffer to a string and sends it to processLine
protected void
processLine(String
the line to log.
line
)

Implements abstract org.apache.tools.ant.util.LineOrientedOutputStream.processLine.

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

Logs a line to the log system of ant.

Inherited from org.apache.tools.ant.util.LineOrientedOutputStream:
closeflushprocessLinewritewrite

Field Detail

levelback to summary
private int level
pcback to summary
private ProjectComponent pc

Constructor Detail

LogOutputStreamback to summary
public LogOutputStream(ProjectComponent pc)

Create a new LogOutputStream for the specified ProjectComponent.

Parameters
pc:ProjectComponent

the project component for whom to log

Since
Ant 1.7.1
LogOutputStreamback to summary
public LogOutputStream(Task task, int level)

Creates a new instance of this class.

Parameters
task:Task

the task for whom to log

level:int

loglevel used to log data written to this stream.

LogOutputStreamback to summary
public LogOutputStream(ProjectComponent pc, int level)

Creates a new instance of this class.

Parameters
pc:ProjectComponent

the project component for whom to log

level:int

loglevel used to log data written to this stream.

Since
Ant 1.6.3

Method Detail

getMessageLevelback to summary
public int getMessageLevel()

Get the level.

Returns:int

the log level.

processBufferback to summary
protected void processBuffer()

Overrides org.apache.tools.ant.util.LineOrientedOutputStream.processBuffer.

Converts the buffer to a string and sends it to processLine

processLineback to summary
protected void processLine(String line)

Implements abstract org.apache.tools.ant.util.LineOrientedOutputStream.processLine.

Logs a line to the log system of ant.

Parameters
line:String

the line to log.

processLineback to summary
protected void processLine(String line, int level)

Logs a line to the log system of ant.

Parameters
line:String

the line to log.

level:int

the logging level to use.