v0.2.0.6(2024/08/09)

1. [t_change_ui: all files]
   - 修改了 logger 的实现
   - 尤其是 clibs.py,使用日志字典,重写了日志记录的功能
This commit is contained in:
2024-08-09 10:47:22 +08:00
parent 340d48876b
commit 3814d163c5
13 changed files with 106 additions and 57 deletions

View File

@ -14,16 +14,14 @@ from commons import openapi, clibs
from matplotlib.pyplot import rcParams, figure, subplots_adjust, close
from matplotlib import use
from pandas import DataFrame, read_excel
from logging import getLogger, INFO
with open(clibs.log_data, 'w') as _:
with open(clibs.log_data_hmi, 'w') as _hmi, open(clibs.log_data_debug, 'w', encoding='utf-8') as _debug:
for i in range(1, 11):
try:
remove(f'{clibs.log_data}.{i}')
remove(f'{clibs.log_data_hmi}.{i}')
except FileNotFoundError:
pass
logger = getLogger(__file__)
logger.setLevel(INFO)
logger = clibs.log_prod
logger.info("日志文件初始化完成...")
use('Agg')