Index: src/edu/ucsb/nceas/metacat/DBSAXHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBSAXHandler.java	(revision 1061)
+++ src/edu/ucsb/nceas/metacat/DBSAXHandler.java	(revision 1062)
@@ -149,7 +149,7 @@
  
    /** SAX Handler that receives notification of beginning of the document */
    public void startDocument() throws SAXException {
-     MetaCatUtil.debugMessage("start Document");
+     MetaCatUtil.debugMessage("start Document", 50);
 
      // Create the document node representation as root
      rootNode = new DBSAXNode(conn, this.docid);
@@ -160,7 +160,7 @@
 
    /** SAX Handler that receives notification of end of the document */
    public void endDocument() throws SAXException {
-     MetaCatUtil.debugMessage("end Document");
+     MetaCatUtil.debugMessage("end Document", 50);
      // Starting new thread for writing XML Index.
      // It calls the run method of the thread.
      try {
@@ -177,7 +177,7 @@
    public void startPrefixMapping(String prefix, String uri) 
                                           throws SAXException
    {
-    MetaCatUtil.debugMessage("NAMESPACE");
+    MetaCatUtil.debugMessage("NAMESPACE", 50);
 
     namespaces.put(prefix, uri);
    }
@@ -186,7 +186,7 @@
    public void startElement(String uri, String localName,
                             String qName, Attributes atts) 
                throws SAXException {
-     MetaCatUtil.debugMessage("Start ELEMENT " + qName);
+     MetaCatUtil.debugMessage("Start ELEMENT " + qName, 50);
  
      DBSAXNode parentNode = null;
      DBSAXNode currentNode = null;
@@ -205,11 +205,11 @@
        if (docname == null) {
          docname = localName;
          doctype = docname;
-         MetaCatUtil.debugMessage("DOCNAME-a: " + docname);
-         MetaCatUtil.debugMessage("DOCTYPE-a: " + doctype);
+         MetaCatUtil.debugMessage("DOCNAME-a: " + docname, 50);
+         MetaCatUtil.debugMessage("DOCTYPE-a: " + doctype, 50);
        } else if (doctype == null) {
          doctype = docname;
-         MetaCatUtil.debugMessage("DOCTYPE-b: " + doctype);
+         MetaCatUtil.debugMessage("DOCTYPE-b: " + doctype, 50);
        }
        rootNode.writeNodename(docname);
        try {
@@ -379,7 +379,7 @@
 
   /** SAX Handler that is called for each XML text node */
   public void characters(char[] cbuf, int start, int len) throws SAXException {
-     MetaCatUtil.debugMessage("CHARACTERS");
+     MetaCatUtil.debugMessage("CHARACTERS", 50);
      DBSAXNode currentNode = (DBSAXNode)nodeStack.peek();
      String data = null;
      int leftover = len;
@@ -415,7 +415,7 @@
      // When validation is turned "on", white spaces are reported here
      // When validation is turned "off" white spaces are not reported here,
      // but through characters() callback
-     MetaCatUtil.debugMessage("IGNORABLEWHITESPACE");
+     MetaCatUtil.debugMessage("IGNORABLEWHITESPACE", 50);
    
 
      DBSAXNode currentNode = (DBSAXNode)nodeStack.peek();
@@ -450,7 +450,7 @@
     */
    public void processingInstruction(String target, String data) 
           throws SAXException {
-     MetaCatUtil.debugMessage("PI");
+     MetaCatUtil.debugMessage("PI", 50);
      DBSAXNode currentNode = (DBSAXNode)nodeStack.peek();
      currentNode.writeChildNodeToDB("PI", target, data, docid);
    }
@@ -458,7 +458,7 @@
    /** SAX Handler that is called at the end of each XML element */
    public void endElement(String uri, String localName,
                           String qName) throws SAXException {
-     MetaCatUtil.debugMessage("End ELEMENT " + qName);
+     MetaCatUtil.debugMessage("End ELEMENT " + qName, 50);
 
      // Get the node from the stack
      DBSAXNode currentNode = (DBSAXNode)nodeStack.pop();
@@ -475,10 +475,10 @@
      doctype = publicId;
      systemid = systemId;
 
-     MetaCatUtil.debugMessage("Start DTD");
-     MetaCatUtil.debugMessage("DOCNAME: " + docname);
-     MetaCatUtil.debugMessage("DOCTYPE: " + doctype);
-     MetaCatUtil.debugMessage("  SYSID: " + systemid);
+     MetaCatUtil.debugMessage("Start DTD", 50);
+     MetaCatUtil.debugMessage("DOCNAME: " + docname, 50);
+     MetaCatUtil.debugMessage("DOCTYPE: " + doctype, 50);
+     MetaCatUtil.debugMessage("  SYSID: " + systemid, 50);
    }
 
    /** 
@@ -486,7 +486,7 @@
     */
    public void endDTD() throws SAXException {
     
-     MetaCatUtil.debugMessage("end DTD");
+     MetaCatUtil.debugMessage("end DTD", 50);
    }
 
    /** 
@@ -493,7 +493,7 @@
     * SAX Handler that receives notification of comments in the DTD
     */
    public void comment(char[] ch, int start, int length) throws SAXException {
-     MetaCatUtil.debugMessage("COMMENT");
+     MetaCatUtil.debugMessage("COMMENT", 50);
      if ( !processingDTD ) {
        DBSAXNode currentNode = (DBSAXNode)nodeStack.peek();
        currentNode.writeChildNodeToDB("COMMENT", null, new String(ch), docid);
@@ -504,7 +504,7 @@
     * SAX Handler that receives notification of the start of CDATA sections
     */
    public void startCDATA() throws SAXException {
-     MetaCatUtil.debugMessage("start CDATA");
+     MetaCatUtil.debugMessage("start CDATA", 50);
    }
 
    /** 
@@ -511,7 +511,7 @@
     * SAX Handler that receives notification of the end of CDATA sections
     */
    public void endCDATA() throws SAXException {
-     MetaCatUtil.debugMessage("end CDATA");
+     MetaCatUtil.debugMessage("end CDATA", 50);
    }
 
    /** 
@@ -518,7 +518,7 @@
     * SAX Handler that receives notification of the start of entities
     */
    public void startEntity(String name) throws SAXException {
-     MetaCatUtil.debugMessage("start ENTITY: " + name);
+     MetaCatUtil.debugMessage("start ENTITY: " + name, 50);
 //System.out.println("start ENTITY: " + name);
      if (name.equals("[dtd]")) {
        processingDTD = true;
@@ -529,7 +529,7 @@
     * SAX Handler that receives notification of the end of entities
     */
    public void endEntity(String name) throws SAXException {
-     MetaCatUtil.debugMessage("end ENTITY: " + name);
+     MetaCatUtil.debugMessage("end ENTITY: " + name, 50);
 //System.out.println("end ENTITY: " + name);
      if (name.equals("[dtd]")) {
        processingDTD = false;
@@ -542,7 +542,7 @@
    public void elementDecl(String name, String model)
                         throws org.xml.sax.SAXException {
 //System.out.println("ELEMENTDECL: " + name + " " + model);
-     MetaCatUtil.debugMessage("ELEMENTDECL: " + name + " " + model);
+     MetaCatUtil.debugMessage("ELEMENTDECL: " + name + " " + model, 50);
    }
 
    /** 
@@ -557,7 +557,7 @@
 //                        + value);
      MetaCatUtil.debugMessage("ATTRIBUTEDECL: " + eName + " " 
                         + aName + " " + type + " " + valueDefault + " "
-                        + value);
+                        + value, 50);
    }
 
    /** 
@@ -566,7 +566,7 @@
    public void internalEntityDecl(String name, String value)
                         throws org.xml.sax.SAXException {
 //System.out.println("INTERNENTITYDECL: " + name + " " + value);
-     MetaCatUtil.debugMessage("INTERNENTITYDECL: " + name + " " + value);
+     MetaCatUtil.debugMessage("INTERNENTITYDECL: " + name + " " + value, 50);
    }
 
    /** 
@@ -578,7 +578,7 @@
 //System.out.println("EXTERNENTITYDECL: " + name + " " + publicId 
 //                              + " " + systemId);
      MetaCatUtil.debugMessage("EXTERNENTITYDECL: " + name + " " + publicId 
-                              + " " + systemId);
+                              + " " + systemId, 50);
      // it processes other external entity, not the DTD;
      // it doesn't signal for the DTD here
      processingDTD = false;
@@ -592,7 +592,7 @@
     * SAX Handler that receives notification of fatal parsing errors
     */
    public void fatalError(SAXParseException exception) throws SAXException {
-     MetaCatUtil.debugMessage("FATALERROR");
+     MetaCatUtil.debugMessage("FATALERROR", 50);
      throw (new SAXException("Fatal processing error.", exception));
    }
 
@@ -600,7 +600,7 @@
     * SAX Handler that receives notification of recoverable parsing errors
     */
    public void error(SAXParseException exception) throws SAXException {
-     MetaCatUtil.debugMessage("ERROR");
+     MetaCatUtil.debugMessage("ERROR", 50);
      throw (new SAXException("Processing error.", exception));
    }
 
@@ -608,7 +608,7 @@
     * SAX Handler that receives notification of warnings
     */
    public void warning(SAXParseException exception) throws SAXException {
-     MetaCatUtil.debugMessage("WARNING");
+     MetaCatUtil.debugMessage("WARNING", 50);
      throw (new SAXException("Warning.", exception));
    }
 
