IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 6, 2011, 10:26:37 PM (15 years ago)
Author:
rhenders
Message:

Added logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/gpc1db.py

    r31200 r31225  
    55import glob
    66import os
     7import logging
    78
    89from java.sql import *
     
    2122
    2223    '''
    23     def __init__(self):
     24    def __init__(self, logger):
     25
     26        # setup logging
     27        self.logger = logger
     28        self.logger.debug("Gpc1Db constructor")
    2429
    2530        # open config
     
    4045    def __del__(self):
    4146
    42         print "Gpc1Db destructor"
     47        self.logger.debug("Gpc1Db destructor")
    4348        self.stmt.close()
    4449        self.con.close()
     
    4954    '''
    5055    def getStackStageCmfs(self, skyID):
     56
     57        self.logger.debug("Querying for stack cmf files")
     58
    5159        sql = "SELECT path_base, num_inputs \
    5260               FROM staticskyResult \
     
    5664            rs.first()
    5765        except:
    58             print "No worky"
     66            self.logger.exception("Can't query for stack cmfs")
    5967
    6068        # get path to base dir of cmf files
Note: See TracChangeset for help on using the changeset viewer.