Administrator
2023-08-17 0d5aa806d1b8aae5a44e6897cea1df51988d0123
删除redis日志与时间日志
2个文件已修改
14 ■■■■ 已修改文件
huaxin_api/l1_client.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
log_module/log.py 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
huaxin_api/l1_client.py
@@ -9,7 +9,7 @@
import xmdapi
from huaxin_api import tool
from huaxin_api.client_network import SendResponseSkManager
from log_module.log import logger_system
from log_module.log import logger_system, logger_local_huaxin_l1
level1_data_dict = {
@@ -162,12 +162,15 @@
def run(pipe_l2):
    time.sleep(10)
    logger_local_huaxin_l1.info("运行l1订阅服务")
    codes_sh = []
    codes_sz = []
    for i in range(3):
        try:
            codes_sh, codes_sz = get_level1_codes()
        except:
            logger_local_huaxin_l1.info(f"获取上证,深证代码数量:sh-{len(codes_sh)} sz-{len(codes_sz)}")
        except Exception as e:
            logger_local_huaxin_l1.exception(e)
            time.sleep(4)
    # 打印接口版本号
log_module/log.py
@@ -223,6 +223,9 @@
        logger.add(self.get_local_huaxin_path("trade", "trade_debug"),
                   filter=lambda record: record["extra"].get("name") == "local_huaxin_trade_debug",
                   rotation="00:00", compression="zip", enqueue=True)
        logger.add(sys.stdout,
                   filter=lambda record: record["extra"].get("name") == "local_huaxin_l1_show_info", enqueue=True)
    def get_path(self, dir_name, log_name):
        path_str = "{}/logs/gp/{}/{}".format(constant.get_path_prefix(), dir_name, log_name) + ".{time:YYYY-MM-DD}.log"
@@ -326,6 +329,10 @@
logger_local_huaxin_l2_subscript = __mylogger.get_logger("local_huaxin_subscript")
logger_local_huaxin_contact_debug = __mylogger.get_logger("local_huaxin_debug")
logger_local_huaxin_trade_debug = __mylogger.get_logger("local_huaxin_trade_debug")
logger_local_huaxin_l1 = __mylogger.get_logger("local_huaxin_l1_show_info")
def close_print():