|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.schmant.report.AbstractReport
org.schmant.report.AbstractPrintingReport
org.schmant.report.FileReport
public class FileReport
This Report
prints its output to a file.
Constructor Summary | |
---|---|
FileReport(String identifier,
ReportLineFormatter llf,
WritableFile f,
boolean append)
Create a new FileReport . |
|
FileReport(String identifier,
WritableFile f)
Create a new FileReport . |
Method Summary | |
---|---|
void |
close()
Close the current report. |
protected void |
printLine(Level l,
String line)
Print the formatted line. |
protected void |
printStacktrace(Level l,
String s)
Print a stacktrace. |
Methods inherited from class org.schmant.report.AbstractPrintingReport |
---|
debug, error, error, getIdentifier, getReportLineFormatter, getSeverityText, getStackTraceWriter, info, log, log, trace, warn, warn |
Methods inherited from class org.schmant.report.AbstractReport |
---|
getLevel, isDebugReported, isErrorReported, isInfoReported, isLevelReported, isOpen, isTraceReported, isWarnReported, setLevel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileReport(String identifier, ReportLineFormatter llf, WritableFile f, boolean append)
FileReport
. This opens the file for
writing/appending. The file will be kept open until close()
is
called.
identifier
- This report's identifier. Can be null
.llf
- The ReportLineFormatter
to use for formatting log
lines in the report.f
- The file to write to. This file is opened by this method and
closed when close()
is called.append
- Should the log file be opened for appending (true
),
preserving old data in the file, or should old data be overwritten
false
.public FileReport(String identifier, WritableFile f)
FileReport
. This opens the file for writing
(discarding old data in the file). The file will be kept open until
close()
is called.
Log lines in the report will be formatted using the
SimpleReportLineFormatter
.
identifier
- This report's identifier. Can be null
.f
- The file to write to. This file is opened by this method and
closed when close()
is called.Method Detail |
---|
protected void printLine(Level l, String line)
AbstractPrintingReport
printLine
in class AbstractPrintingReport
l
- The severity of the log message. It is already verified that log
messages of this severity should be printed.line
- The formatted log line.protected void printStacktrace(Level l, String s)
AbstractPrintingReport
printStacktrace
in class AbstractPrintingReport
l
- The severity of the log message. It is already verified that log
messages of this severity should be printed.s
- The formatted stack trace, including newlines.public void close()
Report
close
in interface Report
close
in class AbstractReport
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |