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
This commit is contained in:
parent
5a3f4539e2
commit
87b64a669f
@ -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 @@ 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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user