[Webfunds-commits] java/webfunds/util Log.java

Ian Grigg iang@cypherpunks.ai
Thu, 12 Apr 2001 00:42:51 -0400 (AST)


iang        01/04/12 00:42:51

  Added:       webfunds/util Log.java
  Log:
  rewritten debug module, extends from PrintWriter, is intermediate
  class on path to proper diagnostics regime, all debuggers should use
  for now.

Revision  Changes    Path
1.1                  java/webfunds/util/Log.java

Index: Log.java
===================================================================
/*
 * Copyright (c) 2001 Systemics Inc on behalf of
 * the WebFunds Development Team.  All Rights Reserved.
 */
package webfunds.util;

import java.io.PrintWriter;

/**
 *  Provide a diagnostics and errors log class for classes to write to.
 *
 *  Extends from PrintWriter as a migration strategy.
 */
public class Log
    extends PrintWriter
{
    /**
     *  @param num is an error code, undefined here,
     *  extending classes to define
     */
    public Log(PrintWriter pw)               { super(pw, true); }
    public Log(PrintWriter pw, boolean b)    { super(pw, true); }
    public Log()                             { super(System.err, true); }


    public void println(String s)              { super.println(s); }
    public void print(String s)                { super.print(s); }


/**
 *  All following methods to go later on.
 */

public boolean checkError()                { throw new Panic("checkError"); }
public void close()                        { throw new Panic("close"); }
//public void flush()                        { throw new Panic("flush"); }

public void print(boolean b)               { throw new Panic("boolean"); }
public void print(char c)                  { throw new Panic("char"); }
public void print(char[] s)                { throw new Panic("char[]"); }
public void print(double d)                { throw new Panic("double"); }
public void print(float f)                 { throw new Panic("float"); }
public void print(int i)                   { throw new Panic("int"); }
public void print(long l)                  { throw new Panic("long"); }
public void print(Object obj)              { throw new Panic("Object"); }

//public void println()                      { throw new Panic("NL"); }
public void println(boolean x)             { throw new Panic("boolean"); }
public void println(char x)                { throw new Panic("char"); }
public void println(char[] x)              { throw new Panic("char[]"); }
public void println(double x)              { throw new Panic("double"); }
public void println(float x)               { throw new Panic("float"); }
public void println(int x)                 { throw new Panic("int"); }
public void println(long x)                { throw new Panic("long"); }
public void println(Object x)              { throw new Panic("Object"); }

//public void write(char[] buf)              { throw new Panic("char[]"); }
//public void write(char[] buf,int off,int len) { throw new Panic("ch[],i,l"); }
//public void write(int c)                   { throw new Panic("int"); }
//public void write(String s)                { throw new Panic("String"); }
//public void write(String s,int off,int len) { throw new Panic("String,i,l"); }
}