Public Member Functions | Static Public Member Functions | Protected Member Functions

org.exolab.castor.util.Logger Class Reference

Inherits java::io::PrintWriter.

List of all members.

Public Member Functions

 Logger (OutputStream output)
 Logger (Writer writer)
Logger setPrefix (String prefix)
Logger setLogTime (boolean logTime)
void println ()
void println (boolean value)
void print (boolean value)
void println (char value)
void print (char value)
void println (int value)
void print (int value)
void println (long value)
void print (long value)
void println (float value)
void print (float value)
void println (double value)
void print (double value)
void println (char[] value)
void print (char[] value)
void println (String value)
void print (String value)
void println (Object value)
void print (Object value)

Static Public Member Functions

static PrintWriter getSystemLogger ()
static void setSystemLogger (PrintWriter system)

Protected Member Functions

final void prefixLine ()

Detailed Description

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.

Author:
Assaf Arkin
Version:
Revision:
1.1.1.1
Date:
2003/03/03 07:09:06

Constructor & Destructor Documentation

org.exolab.castor.util.Logger.Logger ( OutputStream  output  ) 

Constructs a new logger to use the specified output stream.

org.exolab.castor.util.Logger.Logger ( Writer  writer  ) 

Constructs a new logger to use the specified writer.


Member Function Documentation

static PrintWriter org.exolab.castor.util.Logger.getSystemLogger (  )  [static]

Returns the default logger. This logger is used to produce system messages.

final void org.exolab.castor.util.Logger.prefixLine (  )  [protected]

Called before printing from all of the print methods. If at the beginning of a new line, the data/time and prefix will be printed.

Referenced by org.exolab.castor.util.Logger.print(), and org.exolab.castor.util.Logger.println().

void org.exolab.castor.util.Logger.print ( char  value  ) 
void org.exolab.castor.util.Logger.print ( double  value  ) 
void org.exolab.castor.util.Logger.print ( char[]  value  ) 
void org.exolab.castor.util.Logger.print ( int  value  ) 
void org.exolab.castor.util.Logger.print ( String  value  ) 
void org.exolab.castor.util.Logger.print ( Object  value  ) 
void org.exolab.castor.util.Logger.print ( boolean  value  ) 
void org.exolab.castor.util.Logger.print ( long  value  ) 
void org.exolab.castor.util.Logger.print ( float  value  ) 
void org.exolab.castor.util.Logger.println ( char[]  value  ) 
void org.exolab.castor.util.Logger.println ( long  value  ) 
void org.exolab.castor.util.Logger.println ( Object  value  ) 
void org.exolab.castor.util.Logger.println (  ) 
void org.exolab.castor.util.Logger.println ( String  value  ) 
void org.exolab.castor.util.Logger.println ( int  value  ) 
void org.exolab.castor.util.Logger.println ( char  value  ) 
void org.exolab.castor.util.Logger.println ( float  value  ) 
void org.exolab.castor.util.Logger.println ( double  value  ) 
void org.exolab.castor.util.Logger.println ( boolean  value  ) 
Logger org.exolab.castor.util.Logger.setLogTime ( boolean  logTime  ) 

Determines whether to print the time at the beggining of each log line.

Parameters:
logTime True if time should appear at the beggining of each log line
Returns:
This logger
Logger org.exolab.castor.util.Logger.setPrefix ( String  prefix  ) 

Sets the prefix, a short name to print at the beginning of each log line. If a null is passed, no prefix precedes logged lines.

Parameters:
prefix The prefix to use for each line
Returns:
This logger
static void org.exolab.castor.util.Logger.setSystemLogger ( PrintWriter  system  )  [static]

Sets the default logger. This logger is used to produce system messages.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties