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


Python MyLogger.info方法代码示例

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


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

示例1:

# 需要导入模块: from logger import MyLogger [as 别名]
# 或者: from logger.MyLogger import info [as 别名]
        mdp = pickle.load(open("../data/mdp.pkl"))
        args = {"give_prompt": True, "mdp": mdp, "id": "new patient"}
        if progress is None:
            progress = myo_state2.Progress(classifier_pkl="../data/state_classifier.pkl", **args)
            is_running = True
        else:
            if is_running:
                progress.reset()

            progress = myo_state2.Progress(classifier_pkl="../data/state_classifier.pkl", **args)
            is_running = True


if __name__ == "__main__":
    import rospy
    from std_msgs.msg import Int32, Empty

    logger.info("Classifier launched. Listening to message...")

    print "Running developer mode..."
    rospy.init_node("build_classifier")
    logger.info("after node...")
    rospy.Subscriber("/exercise/mode", Int32, signal_handler)

    MyoDemo2.pub_l = rospy.Publisher("/exercise/l/playback", Quaternion, queue_size=1)
    MyoDemo2.pub_u = rospy.Publisher("/exercise/u/playback", Quaternion, queue_size=1)

    print "Classifier launched. Listening to message..."

    rospy.spin()
开发者ID:ylmeng,项目名称:myo_raw,代码行数:32,代码来源:prompt2.py

示例2: _async_emit

# 需要导入模块: from logger import MyLogger [as 别名]
# 或者: from logger.MyLogger import info [as 别名]
            return

        try:
            self.socketio_namespace.on('connect', self.onConnect)
            self.socketio_namespace.on('disconnect', self.onDisconnect)
            self.socketio_namespace.on('reconnect', self.onReconnect)
            logger.info("socketio.on() success")
        except Exception, e:
            logger.error("socketio.on() except {0}".format(e))

        try:
            self.socketio.wait(seconds=1)
        except Exception, e:
            logger.error("wait() except {0}".format(e))

        logger.info("Connected.")

    def _async_emit(self, event, data={'data': 0}):
        try:
            self.connect()
            if self.socketio:
                self.socketio_namespace.emit(event, data)
                self.disconnect()
        except Exception, e:
            logger.error("_async_emit() except {0}".format(e))

    def emit(self, event, data={'data': 0}):
        logger.info("emit to server: {} - {}".format(event, str(data)))
        try:
            Thread(target=self._async_emit, args=(event,),
                   kwargs={'data': data}, name='thread_async_emit').start()
开发者ID:mattli001,项目名称:socketio_client_test,代码行数:33,代码来源:socketio.py

示例3: MyLogger

# 需要导入模块: from logger import MyLogger [as 别名]
# 或者: from logger.MyLogger import info [as 别名]
from logger import MyLogger

logger = MyLogger().logger

def test():
    logger.info('teset here')
    
if __name__ == '__main__':
    import rospy
    from std_msgs.msg import Int32, Empty

    rospy.init_node('build_classifier')
    rospy.Subscriber('/exercise/mode', Int32, test)

    print "Classifier launched. Listening to message..."
    logger.info('Classifier launched. Listening to message...')

    logger.info('main log')
    test()
    rospy.spin()
开发者ID:ylmeng,项目名称:myo_raw,代码行数:22,代码来源:test_logger.py


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