Index: trunk/ippToPsps/src/DetectionBatch.c
===================================================================
--- trunk/ippToPsps/src/DetectionBatch.c	(revision 31030)
+++ trunk/ippToPsps/src/DetectionBatch.c	(revision 31033)
@@ -157,7 +157,7 @@
     }
 
-    this->base.logger->print(this->base.logger, MSG_INFO, 
+    this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch",  
             "+-----------+---------+----------+----------------+--------------+--------------+\n");
-    this->base.logger->print(this->base.logger, MSG_INFO, 
+    this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch",  
             "| Extension | Rows in | Rows out |  Duplicate IDs | Invalid Flux | Bogus det ID |\n");
 
@@ -195,5 +195,5 @@
             skylist = dvoSkyListByExternID(this->base.dvoConfig, sourceId, imageId, &image);
             if (skylist == NULL) {
-                this->base.logger->print(this->base.logger, MSG_ERROR, 
+                this->base.logger->print(this->base.logger, MSG_ERROR, "DetectionBatch",  
                         "DVO: can't find SkyList for sourceId='%d' imageId='%d' (CCD = XY%s): skipping this chip\n",
                         sourceId, imageId, ccdNumber);
@@ -210,5 +210,5 @@
             if (numDvoDetections > this->MAXDETECT ) {
 
-                this->base.logger->print(this->base.logger, MSG_ERROR,"Number of detections (%d) exceeds max limit (%ld)\n",
+                this->base.logger->print(this->base.logger, MSG_ERROR, "DetectionBatch", "Number of detections (%d) exceeds max limit (%ld)\n",
                         numDvoDetections, this->MAXDETECT);
                 error = true;
@@ -375,5 +375,5 @@
             }
 
-            this->base.logger->print(this->base.logger, MSG_INFO,
+            this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch",
                     "|  %s |  %5ld  |   %5d  |     %5d      |    %5d     |    %5d     |\n",
                     extensionName, nChipDetectionsIn, nChipDetectionsOut, numOfDuplicates, numInvalidFlux, numOfInvalidIppIDet);
@@ -388,8 +388,8 @@
     }
 
-    this->base.logger->print(this->base.logger, MSG_INFO, 
+    this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch",  
             "+-----------+---------+----------+----------------+--------------+--------------+\n");
 
-    this->base.logger->print(this->base.logger, MSG_INFO, "Total detections for this exposure = %ld\n", totalDetectionsOut);
+    this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch", "Total detections for this exposure = %ld\n", totalDetectionsOut);
 
     // free-up memory
@@ -425,5 +425,5 @@
     writeResults(this, minObjID, maxObjID, totalDetectionsOut);
 
-    this->base.logger->print(this->base.logger, MSG_INFO, "Data written for a total of %d chips/OTAs", nOta);
+    this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch", "Data written for a total of %d chips/OTAs\n", nOta);
 
     if (error || nOta < 1) this->base.exitCode = PS_EXIT_DATA_ERROR;
@@ -487,5 +487,5 @@
             !haveExpName) {
 
-        this->base.logger->print(this->base.logger, MSG_ERROR, "Problem with supplied arguments\n");
+        this->base.logger->print(this->base.logger, MSG_ERROR, "DetectionBatch", "Problem with supplied arguments\n");
         this->print(this);
         this->base.exitCode = PS_EXIT_CONFIG_ERROR;
@@ -501,5 +501,5 @@
 DetectionBatch* new_DetectionBatch(Logger* logger, int *argc, char **argv) {
 
-    logger->print(logger, MSG_DEBUG, "DetectionBatch: Constructor\n");
+    logger->print(logger, MSG_DEBUG, "DetectionBatch", "Constructor\n");
     DetectionBatch *this = (DetectionBatch*)calloc(1, sizeof(DetectionBatch));
 
@@ -526,28 +526,16 @@
 int main(int argc, char **argv) {
 
-    psTimerStart("detectionbatch");
-
 //    ippToPsps_VersionPrint();
 
-    int exitCode;
-
     Logger* logger = new_Logger(NULL);
+    logger->print(logger, MSG_INFO, "main", "Creating new detection batch\n");
 
     DetectionBatch* detectionBatch = new_DetectionBatch(logger, &argc, argv);
     detectionBatch->base.run(detectionBatch);
-    exitCode = detectionBatch->base.exitCode;
+    int exitCode = detectionBatch->base.exitCode;
 
     detectionBatch->destroy(detectionBatch);
 
-    double secs = psTimerMark("detectionbatch");
-
-    logger->print(logger, MSG_INFO, "detectionbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n",
-            (exitCode == PS_EXIT_SUCCESS) ? "" : "un",
-            exitCode,
-            (secs<60.0) ? secs : (secs/60.0),
-            (secs<60.0) ? "sec(s)" : "min(s)");
-
     // tidy up
-    psTimerStop();
     psLibFinalize();
     logger->destroy(logger);
