10. [APIs: all]: 添加了 logger.setLevel(INFO),只有添加这个,单个模块内才生效

This commit is contained in:
2024-08-01 19:15:08 +08:00
parent 60726d9d07
commit 340d48876b
12 changed files with 33 additions and 24 deletions

View File

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