| | |
| | | # l2数据的日志 |
| | | import time |
| | | |
| | | import log |
| | | from log_module import log, async_log_util |
| | | from l2 import l2_log |
| | | |
| | | |
| | |
| | | timestamp = int(time.time() * 1000) |
| | | # 只记录耗时较长的信息 |
| | | if time_ > 1 or force: |
| | | log.logger_l2_process_time.info("{}-{} {}: {}-{}{}", l2_log.threadIds.get(code), timestamp, description, code, time_, |
| | | "\n" if new_line else "") |
| | | async_log_util.info(log.logger_l2_process_time, "{}-{} {}: {}-{}{}", l2_log.threadIds.get(code), timestamp, |
| | | description, code, time_, |
| | | "\n" if new_line else "") |
| | | return timestamp |
| | | |
| | | |
| | | def l2_time_log(code, description): |
| | | async_log_util.info(log.logger_l2_process_time, "{}-{}: {}", l2_log.threadIds.get(code), code, |
| | | description) |
| | | |
| | | |
| | | class TradeLog: |
| | | |
| | | def __init__(self, thread_id): |