当前位置: 首页>>代码示例>>Python>>正文


Python SMELLIELogger.new_logger方法代码示例

本文整理汇总了Python中smellie.smellie_logger.SMELLIELogger.new_logger方法的典型用法代码示例。如果您正苦于以下问题:Python SMELLIELogger.new_logger方法的具体用法?Python SMELLIELogger.new_logger怎么用?Python SMELLIELogger.new_logger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在smellie.smellie_logger.SMELLIELogger的用法示例。


在下文中一共展示了SMELLIELogger.new_logger方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import new_logger [as 别名]
 def __init__(self):
     self.serial = None
     self.isConnected = False
     SMELLIELogger.new_logger("Interlock")
开发者ID:jlidgard,项目名称:newSmellie,代码行数:6,代码来源:interlock.py

示例2: zip

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import new_logger [as 别名]
            for i,j,k,l in zip(NDPositions,powerDataMean,powerDataSD,powerRangeDataMean):
                fileOut.write( '{},{},{},{}\n'.format( i,j,k,l ) )
            fileOut.closed

        print sk.NDFilter_position()
        sk.NDFilter_set_position(-1*1)
        time.sleep(200)
        print sk.NDFilter_position()

#setup python logger
logging.basicConfig(filename=r'C:/SMELLIE/logs/testing/test_superk_ndfilter.log', filemode="a", level=logging.DEBUG)
console = logging.StreamHandler() #print logger to console
console.setLevel(logging.DEBUG)
logging.getLogger('').addHandler(console)
logging.debug( "Begin Testing SMELLIE SuperK ND filter. {}".format( datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S') ) )
SMELLIELogger.new_logger("test") #give SMELLIE logger a name 
npass = 0
nfail = 0

superk_nd_filter_test = SuperKNDFilterTest()
with superk_nd_filter_test:
    try:
        pass #test ability to set into ready mode and restore safe mode
        #superk_nd_filter_test.test1()
        #test firing pulses (while monitoring the power meter)
        #superk_nd_filter_test.test2()
    except Exception as e:
        logging.debug( "Exception: {}".format(e))
#results
logging.debug( "Finished Testing SMELLIE SuperK ND filter. pass: {}/{}, fail:{}/{}".format(npass,npass+nfail,nfail,npass+nfail) )
开发者ID:jlidgard,项目名称:newSmellie,代码行数:32,代码来源:superK_ndfilter_test.py


注:本文中的smellie.smellie_logger.SMELLIELogger.new_logger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。