v0.2.0.6(2024/08/09)
1. [t_change_ui: all files] - 修改了 logger 的实现 - 尤其是 clibs.py,使用日志字典,重写了日志记录的功能
This commit is contained in:
@ -1,11 +1,8 @@
|
||||
from json import loads
|
||||
from sys import argv
|
||||
from logging import getLogger, INFO
|
||||
from commons import clibs
|
||||
|
||||
tab_name = clibs.tab_names['at']
|
||||
logger = getLogger(__file__)
|
||||
logger.setLevel(INFO)
|
||||
logger = clibs.log_prod
|
||||
|
||||
|
||||
def trigger_estop(md, w2t):
|
||||
@ -40,7 +37,7 @@ def get_state(hr, w2t):
|
||||
|
||||
def warning_info(hr, w2t):
|
||||
for postfix in ['', '.2', '.3', '.4', '.5', '.6', '.7', '.8', '.9', '.10']:
|
||||
log_name = clibs.log_data + postfix
|
||||
log_name = clibs.log_data_hmi + postfix
|
||||
try:
|
||||
with open(log_name, 'r', encoding='utf-8') as f_log:
|
||||
for line in f_log:
|
||||
|
Reference in New Issue
Block a user