|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.PrintWriter
org.exolab.castor.util.Logger
Simple logging facility. This logger extends PrintWriter which is used to trace SQL statements, Castor operations and mapping resolutions.
This logger augments PrintWriter by adding a prefix to each printed line and optionally a time stamp, enabling easy post-mortem analysis.
Field Summary |
Fields inherited from class java.io.PrintWriter |
out |
Fields inherited from class java.io.Writer |
lock |
Constructor Summary | |
Logger(java.io.OutputStream output)
Constructs a new logger to use the specified output stream. |
|
Logger(java.io.Writer writer)
Constructs a new logger to use the specified writer. |
Method Summary | |
static java.io.PrintWriter |
getSystemLogger()
Returns the default logger. |
protected void |
prefixLine()
Called before printing from all of the print methods. |
void |
print(boolean value)
|
void |
print(char value)
|
void |
print(char[] value)
|
void |
print(double value)
|
void |
print(float value)
|
void |
print(int value)
|
void |
print(long value)
|
void |
print(java.lang.Object value)
|
void |
print(java.lang.String value)
|
void |
println()
|
void |
println(boolean value)
|
void |
println(char value)
|
void |
println(char[] value)
|
void |
println(double value)
|
void |
println(float value)
|
void |
println(int value)
|
void |
println(long value)
|
void |
println(java.lang.Object value)
|
void |
println(java.lang.String value)
|
Logger |
setLogTime(boolean logTime)
Determines whether to print the time at the beggining of each log line. |
Logger |
setPrefix(java.lang.String prefix)
Sets the prefix, a short name to print at the beginning of each log line. |
static void |
setSystemLogger(java.io.PrintWriter system)
Sets the default logger. |
Methods inherited from class java.io.PrintWriter |
checkError, close, flush, setError, write, write, write, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Logger(java.io.OutputStream output)
public Logger(java.io.Writer writer)
Method Detail |
public static java.io.PrintWriter getSystemLogger()
public static void setSystemLogger(java.io.PrintWriter system)
public Logger setPrefix(java.lang.String prefix)
prefix
- The prefix to use for each line
public Logger setLogTime(boolean logTime)
logTime
- True if time should appear at the beggining
of each log line
public void println()
public void println(boolean value)
public void print(boolean value)
public void println(char value)
public void print(char value)
public void println(int value)
public void print(int value)
public void println(long value)
public void print(long value)
public void println(float value)
public void print(float value)
public void println(double value)
public void print(double value)
public void println(char[] value)
public void print(char[] value)
public void println(java.lang.String value)
public void print(java.lang.String value)
public void println(java.lang.Object value)
public void print(java.lang.Object value)
protected final void prefixLine()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |