From acd3f8f4d658f8261f3a592d7943c065e0b6fc71 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 04 九月 2023 14:56:20 +0800 Subject: [PATCH] 订阅代码增加跟踪日志 --- huaxin_client/l1_client.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/huaxin_client/l1_client.py b/huaxin_client/l1_client.py index b349f3c..aa2fb21 100644 --- a/huaxin_client/l1_client.py +++ b/huaxin_client/l1_client.py @@ -125,8 +125,9 @@ return # 涓婁紶鏁版嵁 type_ = "set_target_codes" + request_id = f"sb_{int(time.time() * 1000)}" fdata = json.dumps( - {"type": type_, "data": {"data": datas}}) + {"type": type_, "data": {"data": datas}, "request_id": request_id}) if pipe_l2 is not None: pipe_l2.send(fdata) # 璁板綍鏂板鍔犵殑浠g爜 @@ -136,7 +137,7 @@ for c in codes: __latest_subscript_codes.add(c) if add_codes: - logger_local_huaxin_l1.info(f"鏂板鍔犺闃呯殑浠g爜锛歿add_codes}") + logger_local_huaxin_l1.info(f"({request_id})鏂板鍔犺闃呯殑浠g爜锛歿add_codes}") def run(pipe_l2): -- Gitblit v1.8.0