|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.shared.scriptinterpreter.FileLogger
public class FileLogger
Constructor Summary | |
---|---|
FileLogger(File outputFile)
Creates a new logger that writes to the specified file. |
|
FileLogger(File outputFile,
Log log)
Creates a new logger that writes to the specified file and optionally mirrors messages to the given mojo logger. |
Method Summary | |
---|---|
void |
close()
Closes the underlying file stream. |
void |
consumeLine(String line)
Writes the specified line to the log file and optionally to the mojo logger. |
protected void |
finalize()
Closes the underlying file stream. |
File |
getOutputFile()
Gets the path to the output file. |
PrintStream |
getPrintStream()
Gets the underlying stream used to write message to the log file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileLogger(File outputFile) throws IOException
outputFile
- The path to the output file, must not be null
.
IOException
- If the output file could not be created.public FileLogger(File outputFile, Log log) throws IOException
outputFile
- The path to the output file, must not be null
.log
- The mojo logger to additionally output messages to, may be null
if not used.
IOException
- If the output file could not be created.Method Detail |
---|
public File getOutputFile()
null
.public PrintStream getPrintStream()
getPrintStream
in interface ExecutionLogger
null
.public void consumeLine(String line)
consumeLine
in interface ExecutionLogger
line
- The message to log.public void close()
protected void finalize()
finalize
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |