FileDocCategorySizeDatePackage
Debug.javaAPI DocJava SE 6 API3136Tue Jun 10 00:23:00 BST 2008com.sun.org.apache.xml.internal.resolver.helpers

Debug

public class Debug extends Object
Static debugging/messaging class for Catalogs.

This class defines a set of static methods that can be called to produce debugging messages. Messages have an associated "debug level" and messages below the current setting are not displayed.

author
Norman Walsh Norman.Walsh@Sun.COM
version
1.0

Fields Summary
protected int
debug
The internal debug level.
Constructors Summary
public Debug()
Constructor


    
    
    // nop
  
Methods Summary
public intgetDebug()
Get the current debug level.

    return debug;
  
public voidmessage(int level, java.lang.String message)
Print debug message (if the debug level is high enough).

Prints "the message"

param
level The debug level of this message. This message will only be displayed if the current debug level is at least equal to this value.
param
message The text of the message.

    if (debug >= level) {
      System.out.println(message);
    }
  
public voidmessage(int level, java.lang.String message, java.lang.String spec)
Print debug message (if the debug level is high enough).

Prints "the message: spec"

param
level The debug level of this message. This message will only be displayed if the current debug level is at least equal to this value.
param
message The text of the message.
param
spec An argument to the message.

    if (debug >= level) {
      System.out.println(message + ": " + spec);
    }
  
public voidmessage(int level, java.lang.String message, java.lang.String spec1, java.lang.String spec2)
Print debug message (if the debug level is high enough).

Prints "the message: spec1" and "spec2" indented on the next line.

param
level The debug level of this message. This message will only be displayed if the current debug level is at least equal to this value.
param
message The text of the message.
param
spec1 An argument to the message.
param
spec2 Another argument to the message.

    if (debug >= level) {
      System.out.println(message + ": " + spec1);
      System.out.println("\t" + spec2);
    }
  
public voidsetDebug(int newDebug)
Set the debug level for future messages.

    debug = newDebug;