org.gxos.debug
Class Log

java.lang.Object
  |
  +--org.gxos.debug.Log

public class Log
extends java.lang.Object

Log utility

Provides methods for debugging.

$Id: Log.java,v 1.3 2001/04/26 17:53:46 balsoy Exp $


Constructor Summary
Log()
           
 
Method Summary
static void debug(boolean d)
          Sets debug mode to on or off.
static void debug(java.lang.Object obj, java.lang.String msg)
          Prints debug message along with an object.
static void debug(java.lang.String msg)
          Prints a debug message with a date preceding it.
static void error(java.lang.String err)
          Prints errors messages if used to the error output stream.
static void msg(java.lang.String msg)
          Prints message to the log output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Method Detail

debug

public static void debug(boolean d)
Sets debug mode to on or off.
Parameters:
d - Debug messages printed if true; otherwise no message sent to the log output stream.

debug

public static void debug(java.lang.String msg)
Prints a debug message with a date preceding it.
Parameters:
msg - Message to be printed.

debug

public static void debug(java.lang.Object obj,
                         java.lang.String msg)
Prints debug message along with an object. To provide more information about current state of the program or an object, this method can be used. Object is assumed providing a string method; otherwise it is printed with Object.toString() method.
Parameters:
obj - Object related to the message or context.
msg - Message to be printed.

error

public static void error(java.lang.String err)
Prints errors messages if used to the error output stream. Default is the standard output.
Parameters:
err - Error message to be printed.

msg

public static void msg(java.lang.String msg)
Prints message to the log output.
Parameters:
msg - Message to be printed.