Index: /trunk/ippToPsps/jython/gpc1db.py
===================================================================
--- /trunk/ippToPsps/jython/gpc1db.py	(revision 31224)
+++ /trunk/ippToPsps/jython/gpc1db.py	(revision 31225)
@@ -5,4 +5,5 @@
 import glob
 import os
+import logging
 
 from java.sql import *
@@ -21,5 +22,9 @@
 
     '''
-    def __init__(self):
+    def __init__(self, logger):
+
+        # setup logging
+        self.logger = logger
+        self.logger.debug("Gpc1Db constructor")
 
         # open config
@@ -40,5 +45,5 @@
     def __del__(self):
 
-        print "Gpc1Db destructor"
+        self.logger.debug("Gpc1Db destructor")
         self.stmt.close()
         self.con.close()
@@ -49,4 +54,7 @@
     '''
     def getStackStageCmfs(self, skyID):
+
+        self.logger.debug("Querying for stack cmf files")
+
         sql = "SELECT path_base, num_inputs \
                FROM staticskyResult \
@@ -56,5 +64,5 @@
             rs.first()
         except:
-            print "No worky"
+            self.logger.exception("Can't query for stack cmfs")
 
         # get path to base dir of cmf files
Index: /trunk/ippToPsps/jython/ipptopspsdb.py
===================================================================
--- /trunk/ippToPsps/jython/ipptopspsdb.py	(revision 31224)
+++ /trunk/ippToPsps/jython/ipptopspsdb.py	(revision 31225)
@@ -4,4 +4,5 @@
 import sys
 import os
+import logging
 
 from java.sql import *
@@ -19,6 +20,9 @@
 
     '''
-    def __init__(self):
+    def __init__(self, logger):
 
+        # setup logging
+        self.logger = logger
+        self.logger.debug("IppToPspsDb Constructor")
         # open config
         doc = ElementTree(file="config.xml")
@@ -38,5 +42,4 @@
     def createNewBatch(self, expID, surveyType, batchType, dvoDb, datastoreProduct):
 
-        print "Creating nw batch in ippToPsps database"
         sql = "SELECT batch_id FROM batches ORDER BY batch_id DESC LIMIT 1"
 
@@ -48,5 +51,5 @@
             batchID = rs.getInt(1)
         except:
-            print "Unable to get batch ID"
+            self.logger.exception("Unable to get batch ID")
 
         if batchID > 0:
@@ -70,4 +73,6 @@
             self.stmt.execute(sql)
 
+        self.logger.info("Creating new batch in ippToPsps database with batchID = %d" % batchID)
+
         return batchID;
 
@@ -77,5 +82,5 @@
     def __del__(self):
 
-        print "IppToPspsDb destructor"
+        self.logger.debug("IppToPspsDb Desstructor")
         self.stmt.close()
         self.con.close()
