Internet Chess ToolKit
v0.2.0

ictk.util
Class Log

java.lang.Object
  extended byictk.util.Log

public class Log
extends java.lang.Object

Log - a static class with useful global debugging routines. This can be used to manage Debug level output and route output to log files or what have you.


Field Summary
static long Board
           
static long BoardNotation
           
static boolean debug
          to remove all debugging from bytecode set to false
static java.io.PrintStream err
          where the debug and error logs go
static long GameInfo
           
static long GameReader
           
static long GameWriter
           
static long History
           
static long ICSEvent
           
static long ICSEventParser
           
static boolean isFullyQualifiedClass
          do you want fully qualified (package included) class names?
static long Move
           
static long MoveNotation
           
static java.io.PrintStream out
          where the more normal logs go
static int PROG_CRITICAL
           
static int PROG_ERROR
           
static int PROG_WARNING
           
static int USER_CRITICAL
           
static int USER_ERROR
           
static int USER_WARNING
           
 
Method Summary
static void addMask(long mask)
          add a debug mask to turn the output on for a certain group of classes.
static boolean debug(long mask)
           
static void debug(long mask, java.lang.Object o)
          prints out debug information to the log if the mask is found in the current mask setting.
static void debug(long mask, java.lang.String description, java.util.regex.Matcher m)
          this debug call is used specifically to dump a Regex Matcher object.
static void debug2(long mask, java.lang.Object o)
          debug2 is the same as debug() but does not print the ClassName.method() header.
static void error(int severity, java.lang.String msg)
          reports the error message to the error stream.
static void errorIf(boolean t, int severity, java.lang.String msg)
          this reports an error if the boolean condition is true
static long getMask()
          gets the current mask.
static boolean isDebug(long mask)
          are we debugging this mask?
static void removeMask(long mask)
          remove a debug mast to turn the output off for a certian group of classes.
static void setMask(long mask)
          set the whole mast
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static final boolean debug
to remove all debugging from bytecode set to false

See Also:
Constant Field Values

err

public static java.io.PrintStream err
where the debug and error logs go


out

public static java.io.PrintStream out
where the more normal logs go


PROG_CRITICAL

public static final int PROG_CRITICAL
See Also:
Constant Field Values

PROG_ERROR

public static final int PROG_ERROR
See Also:
Constant Field Values

PROG_WARNING

public static final int PROG_WARNING
See Also:
Constant Field Values

USER_CRITICAL

public static final int USER_CRITICAL
See Also:
Constant Field Values

USER_ERROR

public static final int USER_ERROR
See Also:
Constant Field Values

USER_WARNING

public static final int USER_WARNING
See Also:
Constant Field Values

History

public static long History

Board

public static long Board

Move

public static long Move

MoveNotation

public static long MoveNotation

BoardNotation

public static long BoardNotation

GameReader

public static long GameReader

GameWriter

public static long GameWriter

GameInfo

public static long GameInfo

ICSEvent

public static long ICSEvent

ICSEventParser

public static long ICSEventParser

isFullyQualifiedClass

public static boolean isFullyQualifiedClass
do you want fully qualified (package included) class names?

Method Detail

getMask

public static long getMask()
gets the current mask.


setMask

public static void setMask(long mask)
set the whole mast


addMask

public static void addMask(long mask)
add a debug mask to turn the output on for a certain group of classes.


removeMask

public static void removeMask(long mask)
remove a debug mast to turn the output off for a certian group of classes.


isDebug

public static boolean isDebug(long mask)
are we debugging this mask?


debug

public static void debug(long mask,
                         java.lang.Object o)
prints out debug information to the log if the mask is found in the current mask setting. The message is prefaced by the Class and method name of the caller, along with the line number.


debug2

public static void debug2(long mask,
                          java.lang.Object o)
debug2 is the same as debug() but does not print the ClassName.method() header. This is often used as a follow up to a debug() call, where the header info would be redundant.


errorIf

public static void errorIf(boolean t,
                           int severity,
                           java.lang.String msg)
this reports an error if the boolean condition is true


error

public static void error(int severity,
                         java.lang.String msg)
reports the error message to the error stream.


debug

public static void debug(long mask,
                         java.lang.String description,
                         java.util.regex.Matcher m)
this debug call is used specifically to dump a Regex Matcher object.


debug

public static boolean debug(long mask)
Returns:
true if the mask is set

Submit a bug or feature
Visit the Website
Internet Chess ToolKit is licensed under the GPL v2 .