|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.schmant.report.AbstractReport
org.schmant.report.AbstractPrintingReport
public abstract class AbstractPrintingReport
This is an abstract base class for Report implementations that print
their output somewhere.
| Constructor Summary | |
|---|---|
protected |
AbstractPrintingReport(String identifier,
ReportLineFormatter llf)
Constructor. |
| Method Summary | |
|---|---|
void |
debug(Object msg)
Log a message to debug level ( Level.FINE). |
void |
error(Object msg)
Log a message to error level ( Level.SEVERE). |
void |
error(Object msg,
Throwable t)
Log a message and an exception to error level ( Level.SEVERE). |
String |
getIdentifier()
Get the identifier for this report. |
ReportLineFormatter |
getReportLineFormatter()
|
protected String |
getSeverityText(Level l)
Get a text string for the log level. |
PrintWriter |
getStackTraceWriter(Level l)
Get a PrintWriter to write a stack trace to if the stack trace
for some reason cannot be logged through any of the ordinary logger
methods. |
void |
info(Object msg)
Log a message to info level ( Level.INFO). |
void |
log(Object o,
Level l)
Log a message to the supplied level. |
void |
log(Object o,
Throwable t,
Level l)
Log a message and an exception to the supplied level. |
protected abstract void |
printLine(Level l,
String line)
Print the formatted line. |
protected abstract void |
printStacktrace(Level l,
String s)
Print a stacktrace. |
void |
trace(Object msg)
Log a message to trace level ( Level.FINER). |
void |
warn(Object msg)
Log a message to warn level ( Level.WARNING). |
void |
warn(Object msg,
Throwable t)
Log a message and an exception to warn level ( Level.WARNING). |
| Methods inherited from class org.schmant.report.AbstractReport |
|---|
close, 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 |
|---|
protected AbstractPrintingReport(String identifier,
ReportLineFormatter llf)
identifier - An unique identifier for this report instance. (It is
not verified in any way that the identifier actually is unique.)llf - The log line formatter.| Method Detail |
|---|
public String getIdentifier()
Reportnull.
null.
protected abstract void printLine(Level l,
String line)
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 abstract void printStacktrace(Level l,
String s)
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.protected String getSeverityText(Level l)
l - The log level.
public void log(Object o,
Level l)
Report
o - The message to log.l - The level to log to.public void trace(Object msg)
ReportLevel.FINER).
msg - The message to log.public void debug(Object msg)
ReportLevel.FINE).
msg - The message to log.public void info(Object msg)
ReportLevel.INFO).
msg - The message to log.public void warn(Object msg)
ReportLevel.WARNING).
msg - The message to log.
public void warn(Object msg,
Throwable t)
ReportLevel.WARNING).
msg - The message to log.t - The exception to log.public void error(Object msg)
ReportLevel.SEVERE).
msg - The message to log.
public void error(Object msg,
Throwable t)
ReportLevel.SEVERE).
msg - The message to log.t - The exception to log.
public void log(Object o,
Throwable t,
Level l)
Report
o - The message to log. This may be null.t - The exception to log. This may be null.l - The level to log to.public PrintWriter getStackTraceWriter(Level l)
ReportPrintWriter to write a stack trace to if the stack trace
for some reason cannot be logged through any of the ordinary logger
methods.
The caller is responsible for closing the writer.
l - The level to write the stack trace to.
public ReportLineFormatter getReportLineFormatter()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||