From 1ff185866bcf0796d2367699bc000abb326360d5 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 15 九月 2023 17:02:51 +0800 Subject: [PATCH] 交易设置独立进程/删除trade_client_server/记录L2逐笔委托日志 --- l2/l2_data_log.py | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/l2/l2_data_log.py b/l2/l2_data_log.py index 240dd07..dc274f8 100644 --- a/l2/l2_data_log.py +++ b/l2/l2_data_log.py @@ -1,7 +1,7 @@ # l2鏁版嵁鐨勬棩蹇� import time -from log_module import log +from log_module import log, async_log_util from l2 import l2_log @@ -9,11 +9,17 @@ 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): -- Gitblit v1.8.0