xml-commons-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject cvs commit: xml-commons/java/src/org/apache/xml/resolver/helpers Debug.java
Date Wed, 13 Nov 2002 20:44:55 GMT
ndw         2002/11/13 12:44:54

  Modified:    java/src/org/apache/xml/resolver/helpers Debug.java
  Log:
  Debug is no longer static; there's now a unique Debug object associated with each CatalogManager.
This class should probably have been called Message or something...
  
  Revision  Changes    Path
  1.2       +11 -8     xml-commons/java/src/org/apache/xml/resolver/helpers/Debug.java
  
  Index: Debug.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/src/org/apache/xml/resolver/helpers/Debug.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Debug.java	30 Jan 2002 12:25:00 -0000	1.1
  +++ Debug.java	13 Nov 2002 20:44:52 -0000	1.2
  @@ -59,8 +59,6 @@
   
   package org.apache.xml.resolver.helpers;
   
  -import org.apache.xml.resolver.CatalogManager;
  -
   /**
    * <p>Static debugging/messaging class for Catalogs.</p>
    *
  @@ -75,15 +73,20 @@
    */
   public class Debug {
     /** The internal debug level. */
  -    protected static int debug = CatalogManager.verbosity();
  +  protected int debug = 0;
  +
  +  /** Constructor */
  +  public Debug() {
  +    // nop
  +  }
   
     /** Set the debug level for future messages. */
  -  public static void setDebug(int newDebug) {
  +  public void setDebug(int newDebug) {
       debug = newDebug;
     }
   
     /** Get the current debug level. */
  -  public static int getDebug() {
  +  public int getDebug() {
       return debug;
     }
   
  @@ -98,7 +101,7 @@
      * value.
      * @param message The text of the message.
      */
  -  public static void message(int level, String message) {
  +  public void message(int level, String message) {
       if (debug >= level) {
         System.out.println(message);
       }
  @@ -116,7 +119,7 @@
      * @param message The text of the message.
      * @param spec An argument to the message.
      */
  -  public static void message(int level, String message, String spec) {
  +  public void message(int level, String message, String spec) {
       if (debug >= level) {
         System.out.println(message + ": " + spec);
       }
  @@ -135,7 +138,7 @@
      * @param spec1 An argument to the message.
      * @param spec2 Another argument to the message.
      */
  -  public static void message(int level, String message,
  +  public void message(int level, String message,
   			     String spec1, String spec2) {
       if (debug >= level) {
         System.out.println(message + ": " + spec1);
  
  
  

Mime
View raw message