org.exolab.castor.util
public class Logger extends PrintWriter
This logger augments PrintWriter by adding a prefix to each printed line and optionally a time stamp, enabling easy post-mortem analysis.
Version: $Revision: 1.2 $ $Date: 2005/03/05 13:41:57 $
Constructor Summary | |
---|---|
Logger(OutputStream output)
Constructs a new logger to use the specified output stream. | |
Logger(Writer writer)
Constructs a new logger to use the specified writer. |
Method Summary | |
---|---|
static 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(int value) |
void | print(long value) |
void | print(float value) |
void | print(double value) |
void | print(char[] value) |
void | print(String value) |
void | print(Object value) |
void | println() |
void | println(boolean value) |
void | println(char value) |
void | println(int value) |
void | println(long value) |
void | println(float value) |
void | println(double value) |
void | println(char[] value) |
void | println(String value) |
void | println(Object value) |
Logger | setLogTime(boolean logTime)
Determines whether to print the time at the beggining of
each log line.
|
Logger | setPrefix(String prefix)
Sets the prefix, a short name to print at the beginning
of each log line. |
static void | setSystemLogger(PrintWriter system)
Sets the default logger. |
Parameters: logTime True if time should appear at the beggining of each log line
Returns: This logger
Parameters: prefix The prefix to use for each line
Returns: This logger