Index: src/edu/ucsb/nceas/metacat/MetaCatUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/MetaCatUtil.java	(revision 1537)
+++ src/edu/ucsb/nceas/metacat/MetaCatUtil.java	(revision 1538)
@@ -5,7 +5,7 @@
  *             National Center for Ecological Analysis and Synthesis
  *    Authors: Matt Jones, Jivka Bojilova
  *    Release: @release@
- * 
+ *
  *   '$Author$'
  *     '$Date$'
  * '$Revision$'
@@ -52,7 +52,7 @@
 
   //private Hashtable connectionPool = new Hashtable();
 
-  /** 
+  /**
    * Determine our db adapter class and create an instance of that class
    */
   static {
@@ -71,7 +71,7 @@
    * @param className the fully qualified name of the class to instantiate
    */
   public static Object createObject(String className) throws Exception {
- 
+
     Object object = null;
     try {
       Class classDefinition = Class.forName(className);
@@ -86,7 +86,7 @@
     return object;
   }
 
-  /** 
+  /**
    * Utility method to get an option value from the properties file
    *
    * @param optionName the name of the option requested
@@ -101,7 +101,7 @@
       return value;
   }
 
-  /** 
+  /**
    * Utility method to get an option value from a properties file
    *
    * @param optionName the name of the option requested
@@ -115,9 +115,9 @@
     return value;
   }
 
- 
-  
-  
+
+
+
   /** Utility method to convert a file handle into a URL */
   public static URL fileToURL(File file)
   {
@@ -137,9 +137,9 @@
      }
   }
 
-  /** 
+  /**
    * Utility method to parse the query part of a URL into parameters. This
-   * method assumes the format of the query par tof the url is an 
+   * method assumes the format of the query par tof the url is an
    * ampersand separated list of name/value pairs, with equal signs separating
    * the name from the value (e.g., name=tom&zip=99801 ). Returns a
    * has of the name value pairs, hashed on name.
@@ -155,15 +155,15 @@
     int arrcount = 0;
 
     if ( query != null ) {
-      for (int i=0; i < query.length(); i++) { 
+      for (int i=0; i < query.length(); i++) {
 
         // go throught the remainder of the query one character at a time.
-        if (query.charAt(i) == '=') { 
+        if (query.charAt(i) == '=') {
           // if the current char is a # then the preceding should be a name
           if (!poundflag && ampflag) {
             params[arrcount][0] = temp.trim();
             temp = "";
-          } else { 
+          } else {
             //if there are two #s or &s in a row throw an exception.
             throw new MalformedURLException("metacatURL: Two parameter names "+
                                             "not allowed in sequence");
@@ -170,22 +170,22 @@
           }
           poundflag = true;
           ampflag = false;
-        } else if (query.charAt(i) == '&' || i == query.length()-1) { 
+        } else if (query.charAt(i) == '&' || i == query.length()-1) {
           //the text preceding the & should be the param value.
-          if (i == query.length() - 1) { 
+          if (i == query.length() - 1) {
             //if at the end of the string grab the last value and append it.
-            if (query.charAt(i) != '=') { 
+            if (query.charAt(i) != '=') {
             //ignore an extra & on the end of the string
               temp += query.charAt(i);
             }
           }
-  
+
           if (!ampflag && poundflag) {
             params[arrcount][1] = temp.trim();
             parameters.put(params[arrcount][0], params[arrcount][1]);
             temp = "";
             arrcount++; //increment the array to the next row.
-          } else { 
+          } else {
             //if there are two =s or &s in a row through an exception
             throw new MalformedURLException("metacatURL: Two parameter values "+
                                             "not allowed in sequence");
@@ -192,7 +192,7 @@
           }
           poundflag = false;
           ampflag = true;
-        } else { 
+        } else {
           //get the next character in the string
           temp += query.charAt(i);
         }
@@ -201,21 +201,21 @@
     return parameters;
   }
 
-   /** 
+   /**
    * Utility method to print debugging messages. User can set debug level
    * for this message. The number is fewer, the message is more important
    * @param msg, the content of the message
    * @param debugLevel, an integer indicating the message debug leve
    */
-  public static void debugMessage(String msg, int debugLevel) 
+  public static void debugMessage(String msg, int debugLevel)
   {
     if (debug)
     {
       int limit = 1;
-      try 
+      try
       {
         limit=Integer.parseInt(getOption("debuglevel"));
-     
+
       }
       catch (Exception e)
       {
@@ -226,15 +226,15 @@
       {
         debugLevel=1;
       }
-    
-      if (debugLevel < limit) 
+
+      if (debugLevel < limit)
       {
-        System.err.println(msg);
+        System.err.println("@debugprefix@ " +msg);
       }
     }
   }
-  
-  
+
+
   public static Vector getOptionList(String optiontext)
   {
     Vector options = new Vector();
@@ -243,12 +243,12 @@
       options.addElement(optiontext);
       return options;
     }
-    
+
     while(optiontext.indexOf(",") != -1)
     {
       String s = optiontext.substring(0, optiontext.indexOf(","));
       options.addElement(s.trim());
-      optiontext = optiontext.substring(optiontext.indexOf(",") + 1, 
+      optiontext = optiontext.substring(optiontext.indexOf(",") + 1,
                                         optiontext.length());
       if(optiontext.indexOf(",") == -1)
       { //catch the last list entry
@@ -257,7 +257,7 @@
     }
     return options;
   }
-  
+
   /** Normalizes the given string. Taken from configXML.java*/
   public static String normalize(String s)
   {
@@ -301,9 +301,9 @@
       }
     }
     return (str.toString());
-  } 
-  
-  /** 
+  }
+
+  /**
    * Utility method to get docid from a given string
    * @param string, the given string should be these two format:
    *              1) str1.str2  in this case docid= str1.str2
@@ -315,10 +315,10 @@
     String docId = null;
     int dotNumber = 0;//count how many dots in given string
     int indexOfLastDot = 0;
-    
+
     //assume that seperator is one charactor string
     char seperator=getOption("accNumSeparator").charAt(0);
-     
+
     for (int i=0; i<str.length(); i++)
     {
       if ( str.charAt(i)==seperator)
@@ -327,7 +327,7 @@
         indexOfLastDot=i;//keep the last dot postion
       }
     }//for
-    
+
     //The string formatt is wrong, because it has more than two or less than
     //one seperator
     if ( dotNumber>2 || dotNumber < 1)
@@ -342,11 +342,11 @@
     {
       docId=str;
     }
-    
-    return docId;  
+
+    return docId;
   }//getDocIdFromString
 
-  /** 
+  /**
    * Utility method to get version number from a given string
    * @param string, the given string should be these two format:
    *              1) str1.str2(no version)  version =-1;
@@ -360,10 +360,10 @@
     String versionString=null;
     int dotNumber = 0;//count how many dots in given string
     int indexOfLastDot = 0;
-    
+
     //assume that seperator is one charactor string
     char seperator=getOption("accNumSeparator").charAt(0);
-    
+
     for (int i=0; i<str.length(); i++)
     {
       if ( str.charAt(i)==seperator)
@@ -372,7 +372,7 @@
         indexOfLastDot=i;//keep the last dot postion
       }
     }//for
-    
+
     //The string formatt is wrong, because it has more than two or less than
     //one seperator
     if ( dotNumber>2 || dotNumber < 1)
@@ -379,7 +379,7 @@
     {
       version=-2;
     }
-    else if (dotNumber == 2 && (indexOfLastDot != (str.length() -1))) 
+    else if (dotNumber == 2 && (indexOfLastDot != (str.length() -1)))
      //the case for str1.str2.str3
     {
        versionString=str.substring((indexOfLastDot+1), str.length());
@@ -389,12 +389,12 @@
     {
       version=-1;
     }
-    
-    return version;  
+
+    return version;
   }//getVersionFromString
-  
-  
-  /** 
+
+
+  /**
    * Utility method to get version string from a given string
    * @param string, the given string should be these two format:
    *              1) str1.str2(no version)  version=null;
@@ -408,10 +408,10 @@
     String versionString=null;
     int dotNumber = 0;//count how many dots in given string
     int indexOfLastDot = 0;
-    
+
     //assume that seperator is one charactor string
     char seperator=getOption("accNumSeparator").charAt(0);
-    
+
     for (int i=0; i<str.length(); i++)
     {
       if ( str.charAt(i)==seperator)
@@ -420,7 +420,7 @@
         indexOfLastDot=i;//keep the last dot postion
       }
     }//for
-    
+
     //The string formatt is wrong, because it has more than two or less than
     //one seperator
     if ( dotNumber>2 || dotNumber < 1)
@@ -427,7 +427,7 @@
     {
       versionString = null;
     }
-    else if (dotNumber == 2 && (indexOfLastDot != (str.length() -1))) 
+    else if (dotNumber == 2 && (indexOfLastDot != (str.length() -1)))
     {
       //the case for str1.str2.str3
       // indexOfLastDot != (str.length() -1) means get rid of str1.str2.
@@ -437,10 +437,10 @@
     {
       versionString=null;
     }
-    
-    return versionString;  
+
+    return versionString;
   }//getVersionFromString
-   
+
   /**
    * Method to get the name of local replication server
    */
@@ -452,9 +452,9 @@
      // append "context/servelet/replication" to the host name
      replicationServerName=serverHost+getOption("replicationpath");
      return replicationServerName;
-       
+
    }
-   
+
    /**
     * Method to get docidwithrev from eml2 inline data id
     * The eml inline data id would look like eml.200.2.3
@@ -485,11 +485,11 @@
          break;
        }
      }
-      
-     MetaCatUtil.debugMessage("Docid without rev from inlinedata id: " + 
+
+     MetaCatUtil.debugMessage("Docid without rev from inlinedata id: " +
                                docidWithoutRev, 35);
      return docidWithoutRev;
-     
+
    }
-  
+
 }
Index: build.xml
===================================================================
--- build.xml	(revision 1537)
+++ build.xml	(revision 1538)
@@ -44,7 +44,7 @@
    <target name="postgresql">
      <!-- Customize these properties if you are using postgres -->
      <property name="jdbc-connect"
-               value="jdbc:postgresql://localhost/exp"/>
+               value="jdbc:postgresql://localhost/metacat"/>
      <property name="dbDriver" value="org.postgresql.Driver"/>
      <property name="dbAdapter"
                value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
@@ -57,18 +57,18 @@
 
       <!-- Customize these properties for your system -->
       <property name="tomcat" value="/usr/local/devtools/jakarta-tomcat" />
-      <property name="webapps" value="/usr/local/devtools/jakarta-tomcat/webapps" />
-      <property name="context" value="tao" />
-      <property name="user" value="tao"/>
-      <property name="password" value="tdataint"/>
-      <property name="server" value="pine.nceas.ucsb.edu:8443"/>
-      <property name="systemidserver" value="http://pine.nceas.ucsb.edu:8080" />
-      <property name="datafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/data" />
-      <property name="inlinedatafilepath" value="/usr/local/devtools/jakarta-tomcat/data/tao/inlinedata" />
+      <property name="webapps" value="/opt/tomcat/webapps" />
+      <property name="context" value="metacat" />
+      <property name="user" value="berkley"/>
+      <property name="password" value=""/>
+      <property name="server" value="trestles.nceas.ucsb.edu:8080"/>
+      <property name="systemidserver" value="http://trestles.nceas.ucsb.edu:8080" />
+      <property name="datafilepath" value="/opt/tomcat/data/metacat/data" />
+      <property name="inlinedatafilepath" value="/opt/tomcat/data/metacat/inlinedata" />
       <property name="debuglevel" value="45" />
       <property name="forcereplicationwaitingtime" value="30000"/>
       <property name="cvsroot"
-                value=":ext:tao@cvs.ecoinformatics.org:/cvs" />
+                value=":ext:berkley@cvs.ecoinformatics.org:/cvs" />
       <property name="web-base-url"
                 value="http://knb.ecoinformatics.org"/>
       <property name="default-style" value="knb" />
@@ -110,6 +110,7 @@
       <property name="installdir" value="${webapps}/${context}" />
       <property name="name" value="metacat"/>
       <property name="Name" value="MetaCat"/>
+      <property name="debugprefix" value="${Name}:"/>
       <property name="release" value="1.2.1"/>
       <property name="replication-path"
                 value="/${context}/servlet/replication"/>
@@ -153,6 +154,7 @@
       <filter token="datafilepath" value="${datafilepath}" />
       <filter token="inlinedatafilepath" value="${inlinedatafilepath}" />
       <filter token="defaultcontenttype" value="${defaultcontenttype}" />
+      <filter token="debugprefix" value="${debugprefix}"/>
 
       <property name="srcdir" value="./src" />
       <property name="junittestsdir" value="./test/edu/ucsb/nceas/metacattest" />
