From 87b64a669fa73810cfce0cbab8655be5aee82a73 Mon Sep 17 00:00:00 2001 From: ndw Date: Wed, 13 Nov 2002 20:44:52 +0000 Subject: [PATCH] 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... git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226005 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/xml/resolver/helpers/Debug.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/java/src/org/apache/xml/resolver/helpers/Debug.java b/java/src/org/apache/xml/resolver/helpers/Debug.java index d9fb536..9797d6f 100644 --- a/java/src/org/apache/xml/resolver/helpers/Debug.java +++ b/java/src/org/apache/xml/resolver/helpers/Debug.java @@ -59,8 +59,6 @@ package org.apache.xml.resolver.helpers; -import org.apache.xml.resolver.CatalogManager; - /** *

Static debugging/messaging class for Catalogs.

* @@ -75,15 +73,20 @@ import org.apache.xml.resolver.CatalogManager; */ 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 @@ public class Debug { * 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 @@ public class Debug { * @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 @@ public class Debug { * @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);