本文整理匯總了Python中logger.logger.Logger.trace方法的典型用法代碼示例。如果您正苦於以下問題:Python Logger.trace方法的具體用法?Python Logger.trace怎麽用?Python Logger.trace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類logger.logger.Logger
的用法示例。
在下文中一共展示了Logger.trace方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: lineReceived
# 需要導入模塊: from logger.logger import Logger [as 別名]
# 或者: from logger.logger.Logger import trace [as 別名]
def lineReceived(self, json_payloads):
Logger.trace('line received lost from network process: (%s)', json_payloads, category='client')
json_payloads.replace(self.terminator, '')
for json_payload in json_payloads.split('\n'):
json_payload = json_payload.strip('\r')
if json_payload != '':
payload = json.loads(json_payload)
self.output_queue.put(payload)
示例2: __init__
# 需要導入模塊: from logger.logger import Logger [as 別名]
# 或者: from logger.logger.Logger import trace [as 別名]
def __init__(self, pdu_or_object):
self.pdu = {}
Logger.debug("PDU init (%s:%s)", (type(pdu_or_object), pdu_or_object), 'network_protocol')
if isinstance(pdu_or_object, dict):
Logger.trace("PDU init from dict", category='network_protocol')
self.from_dictionary(pdu_or_object)
else:
Logger.trace("PDU init from object", category='network_protocol')
self.from_object(pdu_or_object)
示例3: send_to_server_recursive_threaded_loop
# 需要導入模塊: from logger.logger import Logger [as 別名]
# 或者: from logger.logger.Logger import trace [as 別名]
def send_to_server_recursive_threaded_loop(connection_handler):
Logger.trace('loop from network process sender thread', category='client')
while not connection_handler.input_queue.empty():
payload = connection_handler.input_queue.get()
Logger.debug('fetch input_queue from network process sender thread', payload, category='client')
connection_handler.sendLine(json.dumps(payload))
time.sleep(0.01) # 10 ms
# get our Deferred which will be called with the largeFibonnaciNumber result
threads.deferToThread(send_to_server_recursive_threaded_loop, connection_handler)
示例4:
# 需要導入模塊: from logger.logger import Logger [as 別名]
# 或者: from logger.logger.Logger import trace [as 別名]
quit_the_game = False
while not quit_the_game:
# fetch network inputs and update game state
if not networkProcess.output_queue.empty():
payload = networkProcess.output_queue.get()
Logger.debug("fetch input_queue from main, from network process to screen", category='start_client')
client_game_handler.on_line_received(payload)
# fetch local input and update game state
user_input = localInputFeed.fetch_user_input()
client_game_handler.on_local_user_input(user_input)
# redraw game
tick_simulator.simulate(game, lambda self: self.tick())
#game.tick()
hmi.draw()
if user_input.has_pressed_something():
# send local user_inputs
Logger.debug("user_input to payload, from screen to network process", category='start_client')
payload = client_game_handler.user_input_to_payload(user_input)
Logger.trace("user_input to payload, from screen to network process: (%s)", payload, 'start_client')
networkProcess.input_queue.put(payload)
# ask for 60 frames per second
clock.tick(Game.fps)
networkProcess.stop()
game.quit()