本文整理汇总了Python中lsst.pex.logging.Log.getThreshold方法的典型用法代码示例。如果您正苦于以下问题:Python Log.getThreshold方法的具体用法?Python Log.getThreshold怎么用?Python Log.getThreshold使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lsst.pex.logging.Log
的用法示例。
在下文中一共展示了Log.getThreshold方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configurePipeline
# 需要导入模块: from lsst.pex.logging import Log [as 别名]
# 或者: from lsst.pex.logging.Log import getThreshold [as 别名]
def configurePipeline(self):
"""
Configure the Pipeline by reading a Policy File
"""
if (self.executePolicy.exists('nSlices')):
self.nSlices = self.executePolicy.getInt('nSlices')
else:
self.nSlices = 0 # default value
self.universeSize = self.nSlices + 1;
if (self.executePolicy.exists('barrierDelay')):
self.barrierDelay = self.executePolicy.getDouble('barrierDelay')
else:
self.barrierDelay = 0.000001 # default value
# do some juggling to capture the actual stage policy names. We'll
# use these to assign some logical names to the stages for logging
# purposes. Note, however, that it is only convention that the
# stage policies will be specified as separate files; thus, we need
# a fallback.
stgcfg = self.executePolicy.getArray("appStage")
self.stageNames = []
for subpol in stgcfg:
stageName = subpol.get("name")
self.stageNames.append(stageName)
self.executePolicy.loadPolicyFiles()
# Obtain the working directory space locators
psLookup = lsst.daf.base.PropertySet()
if (self.executePolicy.exists('dir')):
dirPolicy = self.executePolicy.get('dir')
shortName = None
if (dirPolicy.exists('shortName')):
shortName = dirPolicy.get('shortName')
if shortName == None:
shortName = self.pipelinePolicyName.split('.')[0]
dirs = Directories(dirPolicy, shortName, self._runId)
psLookup = dirs.getDirs()
if (self.executePolicy.exists('database.url')):
psLookup.set('dbUrl', self.executePolicy.get('database.url'))
log = Log(self.log, "configurePipeline")
log.log(Log.INFO,
"Logging messages using threshold=%i" % log.getThreshold())
LogRec(log, self.VERB1) << "Configuring pipeline" \
<< Prop("universeSize", self.universeSize) \
<< Prop("runID", self._runId) \
<< Prop("rank", -1) \
<< Prop("workerId", self.workerId) \
<< LogRec.endr;
# Configure persistence logical location map with values for directory
# work space locators
dafPersist.LogicalLocation.setLocationMap(psLookup)
log.log(self.VERB2, "eventBrokerHost %s " % self.eventBrokerHost)
log.log(self.VERB2, "barrierDelay %s " % self.barrierDelay)
# Check for eventTimeout
if (self.executePolicy.exists('eventTimeout')):
self.eventTimeout = self.executePolicy.getInt('eventTimeout')
else:
self.eventTimeout = 10000000 # default value is 10 000 000
# Process Application Stages
fullStageList = self.executePolicy.getArray("appStage")
self.nStages = len(fullStageList)
log.log(self.VERB2, "Found %d stages" % len(fullStageList))
fullStageNameList = [ ]
self.stagePolicyList = [ ]
for stagei in xrange(self.nStages):
fullStagePolicy = fullStageList[stagei]
if (fullStagePolicy.exists('serialClass')):
serialName = fullStagePolicy.getString('serialClass')
stagePolicy = fullStagePolicy.get('stagePolicy')
else:
serialName = "lsst.pex.harness.stage.NoOpSerialProcessing"
stagePolicy = None
fullStageNameList.append(serialName)
self.stagePolicyList.append(stagePolicy)
if self.stageNames[stagei] is None:
self.stageNames[stagei] = fullStageNameList[-1].split('.')[-1]
log.log(self.VERB3,
"Stage %d: %s: %s" % (stagei+1, self.stageNames[stagei],
fullStageNameList[-1]))
for astage in fullStageNameList:
fullStage = astage.strip()
tokenList = astage.split('.')
classString = tokenList.pop()
classString = classString.strip()
package = ".".join(tokenList)
#.........这里部分代码省略.........