Administrator
2023-08-28 4bec5d4c562e5ae9813fda6777be2bc42b942cb5
打开调试日志
2个文件已修改
10 ■■■■■ 已修改文件
huaxin_client/trade_client_server.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
log_module/log.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
huaxin_client/trade_client_server.py
@@ -1,6 +1,7 @@
import json
import socket
import socketserver
import time
from huaxin_client.command_manager import TradeCommandManager
from utils import socket_util
@@ -38,6 +39,7 @@
def run():
    time.sleep(10)
    laddr = "0.0.0.0", SERVER_PORT
    tcpserver = MyThreadingTCPServer(laddr, MyBaseRequestHandle)  # 注意:参数是MyBaseRequestHandle
    tcpserver.serve_forever()
log_module/log.py
@@ -356,10 +356,10 @@
def close_print():
    pass
    # logging.basicConfig(level=logging.ERROR)
    # if not constant.is_windows():
    #     os.close(1)
    #     os.open('/dev/null', os.O_WRONLY)
    logging.basicConfig(level=logging.ERROR)
    if not constant.is_windows():
        os.close(1)
        os.open('/dev/null', os.O_WRONLY)
if __name__ == "__main__":