admin
2025-04-08 70b51a2636858fb8cfbf39d3764d88d07286d8ad
strategy/L2_data_analysis.py
@@ -40,7 +40,7 @@
    # 获取当前日期,并格式化为 'YYYY-MM-DD'
    current_date = datetime.datetime.now().strftime('%Y-%m-%d')
    # 声明要转义的文件的路径
    log_file_path = f'{constant.LOG_PATH}/transaction.{current_date}.log'
    log_file_path = f'{constant.L2_LOG_PATH}/transaction.{current_date}.log'
    # 检查文件是否存在,如果存在则继续处理,如果不存在则就此打住
    if not os.path.exists(log_file_path):
        logger.info(f"Error错误:{log_file_path}----文件不存在!")
@@ -65,11 +65,6 @@
        # print(f"没有找到这个货:{code}")
# 测试的时候可以调用一下
find_L2_big_order_of_code('002384')
# # 如果你需要将解析后的日志保存到新文件中,可以使用以下代码:
# output_file_path = 'path/to/your/parsed_logfile.txt'
# with open(output_file_path, 'w', encoding='utf-8') as output_file:
#     for log in parsed_logs:
#         output_file.write(log + '\n')
if __name__ == '__main__':
    # 测试的时候可以调用一下
    find_L2_big_order_of_code('002384')