Index: src/edu/ucsb/nceas/metacat/ReplicationHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/ReplicationHandler.java	(revision 2724)
+++ src/edu/ucsb/nceas/metacat/ReplicationHandler.java	(revision 2725)
@@ -64,8 +64,10 @@
   //PrintWriter out;
   private static final AbstractDatabase dbAdapter = MetaCatUtil.dbAdapter;
   private static Logger logMetacat = Logger.getLogger(ReplicationHandler.class);
- 
-  
+  private static int DOCINSERTNUMBER = 1;
+  private static int DOCERRORNUMBER  = 1;
+  private static int REVINSERTNUMBER = 1;
+  private static int REVERRORNUMBER  = 1;
   public ReplicationHandler()
   {
     //this.out = o;
@@ -224,6 +226,7 @@
         }
         //v is the list of updated documents
         Vector updateList = new Vector(message.getUpdatesVect());
+        MetacatReplication.replLog("The document list size is "+updateList.size());
         //System.out.println("v: " + v.toString());
         //d is the list of deleted documents
         Vector deleteList = new Vector(message.getDeletesVect());
@@ -230,6 +233,7 @@
         //System.out.println("d: " + d.toString());
         logMetacat.info("Update vector size: "+ updateList.size());
         logMetacat.info("Delete vector size: "+ deleteList.size());
+        MetacatReplication.replLog("The delete document list size is "+deleteList.size());
         // go though every element in updated document vector
         handleDocList(updateList, DocumentImpl.DOCUMENTTABLE);
         //handle deleted docs
@@ -249,7 +253,12 @@
         
         // handle replicate doc in xml_revision
         Vector revisionList = new Vector(message.getRevisionsVect());
+        MetacatReplication.replLog("The revision document list size is "+revisionList.size());
         handleDocList(revisionList, DocumentImpl.REVISIONTABLE);
+        DOCINSERTNUMBER = 1;
+        DOCERRORNUMBER  = 1;
+        REVINSERTNUMBER = 1;
+        REVERRORNUMBER  = 1;
     }//for response
 
     //updated last_checked
@@ -352,14 +361,41 @@
                               createdDate,
                               updatedDate);
       logMetacat.info("Successfully replicated doc " + accNumber);
-      MetacatReplication.replLog("wrote doc " + accNumber + " from " +
+      if (tableName.equals(DocumentImpl.DOCUMENTTABLE))
+      {
+        MetacatReplication.replLog("" +DOCINSERTNUMBER + " Wrote xml doc " + accNumber +
+                                     " into "+tableName + " from " +
                                          remoteserver);
+        DOCINSERTNUMBER++;
+      }
+      else
+      {
+          MetacatReplication.replLog("" +REVINSERTNUMBER + " Wrote xml doc " + accNumber +
+                  " into "+tableName + " from " +
+                      remoteserver);
+          REVINSERTNUMBER++;
+      }
+      
 
     }//try
     catch(Exception e)
     {
-      MetacatReplication.replErrorLog("Failed to write doc " + accNumber +
-                                      " into db because " +e.getMessage());
+        
+        if (tableName.equals(DocumentImpl.DOCUMENTTABLE))
+        {
+          MetacatReplication.replErrorLog("" +DOCERRORNUMBER + " Failed to write xml doc " + accNumber +
+                                       " into "+tableName + " from " +
+                                           remoteserver + " because "+e.getMessage());
+          DOCERRORNUMBER++;
+        }
+        else
+        {
+            MetacatReplication.replLog("" +REVERRORNUMBER + " Failed to write xml doc " + accNumber +
+                    " into "+tableName + " from " +
+                        remoteserver +" because "+e.getMessage());
+            REVERRORNUMBER++;
+        }
+       
       logMetacat.error("Failed to write doc " + accNumber +
                                       " into db because " +e.getMessage());
       throw e;
@@ -439,8 +475,23 @@
                                                 updatedDate);
                                          
         logMetacat.info("Successfully to write datafile " + accNumber);
-        MetacatReplication.replLog("wrote datafile " + accNumber + " from " +
-                                    remoteserver);
+        /*MetacatReplication.replLog("wrote datafile " + accNumber + " from " +
+                                    remoteserver);*/
+        if (tableName.equals(DocumentImpl.DOCUMENTTABLE))
+        {
+          MetacatReplication.replLog("" +DOCINSERTNUMBER + " Wrote data file" + accNumber +
+                                       " into "+tableName + " from " +
+                                           remoteserver);
+          DOCINSERTNUMBER++;
+        }
+        else
+        {
+            MetacatReplication.replLog("" +REVINSERTNUMBER + " Wrote data file" + accNumber +
+                    " into "+tableName + " from " +
+                        remoteserver);
+            REVINSERTNUMBER++;
+        }
+        
       }//if
       else
       {
@@ -451,8 +502,22 @@
     }//try
     catch(Exception e)
     {
-      MetacatReplication.replErrorLog("Failed to try wrote datafile " + accNumber +
-                                      " because " +e.getMessage());
+      /*MetacatReplication.replErrorLog("Failed to try wrote datafile " + accNumber +
+                                      " because " +e.getMessage());*/
+      if (tableName.equals(DocumentImpl.DOCUMENTTABLE))
+      {
+        MetacatReplication.replErrorLog("" +DOCERRORNUMBER + " Failed to write xml doc " + accNumber +
+                                     " into "+tableName + " from " +
+                                         remoteserver + " because "+e.getMessage());
+        DOCERRORNUMBER++;
+      }
+      else
+      {
+          MetacatReplication.replLog("" +REVERRORNUMBER + " Failed to write xml doc " + accNumber +
+                  " into "+tableName + " from " +
+                      remoteserver +" because "+e.getMessage());
+          REVERRORNUMBER++;
+      }
       logMetacat.error("Failed to try wrote datafile " + accNumber +
                                       " because " +e.getMessage());
       throw e;
