Skip to content

Commit

Permalink
Update logging calls for migrating to lsst.log
Browse files Browse the repository at this point in the history
  • Loading branch information
Hsin-Fang Chiang committed Aug 4, 2016
1 parent c3154c7 commit 124e99f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/lsst/obs/lsstSim/lsstSimIsrTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ def runDataRef(self, sensorRef):
@return a pipeBase.Struct with fields:
- exposure: the exposure after application of ISR
"""
self.log.log(self.log.INFO, "Performing ISR on sensor %s" % (sensorRef.dataId))
self.log.info("Performing ISR on sensor %s", sensorRef.dataId)
snapDict = dict()
for snapRef in sensorRef.subItems(level="snap"):
snapId = snapRef.dataId['snap']
if snapId not in (0, 1):
raise RuntimeError("Unrecognized snapId=%s" % (snapId,))

self.log.log(self.log.INFO, "Performing ISR on snap %s" % (snapRef.dataId))
self.log.info("Performing ISR on snap %s", snapRef.dataId)
ccdExposure = snapRef.get('raw')
isrData = self.readIsrData(snapRef, ccdExposure)
ccdExposure = self.run(ccdExposure, **isrData.getDict()).exposure
Expand All @@ -145,7 +145,7 @@ def runDataRef(self, sensorRef):
loadSnapDict(snapDict, snapIdList=(0, 1), sensorRef=sensorRef)
postIsrExposure = self.snapCombine.run(snapDict[0], snapDict[1]).exposure
else:
self.log.log(self.log.WARN, "doSnapCombine false; using snap 0 as the result")
self.log.warn("doSnapCombine false; using snap 0 as the result")
loadSnapDict(snapDict, snapIdList=(0,), sensorRef=sensorRef)
postIsrExposure = snapDict[0]

Expand Down

0 comments on commit 124e99f

Please sign in to comment.