Administrator
2024-04-10 9a8a924d75fd4e29c4c14c86c041c00ba89f615a
log_module/log_export.py
@@ -501,7 +501,7 @@
# 读取系统日志
def load_huaxin_transaction_map(date=tool.get_now_date_str()):
def load_huaxin_transaction_map(date=tool.get_now_date_str(), with_time=False):
    path = f"{constant.get_path_prefix()}/logs/huaxin/l2/transaction.{date}.log"
    fdatas = {}
    if os.path.exists(path):
@@ -512,11 +512,16 @@
                    try:
                        data = line.split(" - ")[1].strip()
                        if data.startswith("["):
                            time_str = data[data.find("[") + 1:data.find("]")].strip()
                            data = data[data.find("]") + 1:].strip()
                        code = data.split("#")[0]
                        l2_data = eval(data.split("#")[1])
                        if code not in fdatas:
                            fdatas[code] = []
                        if with_time:
                            fdatas[code].append((time_str, l2_data))
                        else:
                        fdatas[code].append(l2_data)
                    except:
                        pass