本文整理汇总了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()
示例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()
示例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()