/** 
 * Project    : KANT (LMT)
 * Source Name: Debug.java
 * Copyright  : Copyright (c) LTI, Carnegie Mellon University
 * Description: Class for debugging
 * @version     1.0 (created by jko - 10/01/01)
 **/

package lmt;

import java.io.*;
import java.text.*;
import java.util.*;

public class Debug
{
  public static boolean debugging = true;
  public static PrintStream debugOut = System.out;
  public static boolean showTime = false;
  private static DateFormat df = DateFormat.getTimeInstance(DateFormat.LONG);

  public static void setDebugging(boolean value) {
    debugging = value;
  }
  
  public static void debug(String s)
  {
    if (!debugging) return;

    if (showTime)
      debugOut.println("(* " + df.format(new Date()) + " *) " + s);
    else
      debugOut.println(s);
  }
}
