Package org.apache.tools.ant.taskdefs
Class LogOutputStream
- java.lang.Object
- 
- java.io.OutputStream
- 
- org.apache.tools.ant.util.LineOrientedOutputStream
- 
- org.apache.tools.ant.taskdefs.LogOutputStream
 
 
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.io.Flushable,- java.lang.AutoCloseable
 - Direct Known Subclasses:
- JUnitTask.JUnitLogOutputStream
 
 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 SummaryConstructors Constructor Description LogOutputStream(ProjectComponent pc)Create a new LogOutputStream for the specified ProjectComponent.LogOutputStream(ProjectComponent pc, int level)Creates a new instance of this class.LogOutputStream(Task task, int level)Creates a new instance of this class.
 - 
Method SummaryModifier and Type Method Description intgetMessageLevel()Get the level.protected voidprocessBuffer()Converts the buffer to a string and sends it toprocessLineprotected voidprocessLine(java.lang.String line)Logs a line to the log system of ant.protected voidprocessLine(java.lang.String line, int level)Logs a line to the log system of ant.- 
Methods inherited from class org.apache.tools.ant.util.LineOrientedOutputStreamclose, flush, processLine, write, write
 
- 
 
- 
- 
- 
Constructor Detail- 
LogOutputStreampublic LogOutputStream(ProjectComponent pc) Create a new LogOutputStream for the specified ProjectComponent.- Parameters:
- pc- the project component for whom to log
- Since:
- Ant 1.7.1
 
 - 
LogOutputStreampublic 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.
 
 - 
LogOutputStreampublic 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- 
processBufferprotected void processBuffer() Converts the buffer to a string and sends it toprocessLine- Overrides:
- processBufferin class- LineOrientedOutputStream
 
 - 
processLineprotected void processLine(java.lang.String line) Logs a line to the log system of ant.- Specified by:
- processLinein class- LineOrientedOutputStream
- Parameters:
- line- the line to log.
 
 - 
processLineprotected void processLine(java.lang.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.
 
 - 
getMessageLevelpublic int getMessageLevel() Get the level.- Returns:
- the log level.
 
 
- 
 
-