commit about v 0.5.2

release comming(no DEMO)
This commit is contained in:
沈瑗杰 2021-09-22 06:32:10 +08:00
parent ccc879d986
commit 19bb142121
3 changed files with 12 additions and 3 deletions

View File

@ -44,9 +44,16 @@ class Game:
log_config = tools.config('configs/logger.json5') log_config = tools.config('configs/logger.json5')
file_name = log_config['handlers']['file']['filename'] file_name = log_config['handlers']['file']['filename']
del log_config['handlers']['file']['datefmt'] del log_config['handlers']['file']['datefmt']
log_config['handlers']['file']['filename'] = file_name.format(self.start_time) log_config['handlers']['file']['filename'] = f'logs/{file_name.format(self.start_time)}'
try:
logging.config.dictConfig(log_config) logging.config.dictConfig(log_config)
self.logger = logging.getLogger('main') self.logger = logging.getLogger('main')
except ValueError:
os.mkdir('logs')
logging.config.dictConfig(log_config)
self.logger = logging.getLogger('main')
self.logger.info(tr['main']['logger.mkdir'])
self.logger.info(tr['main']['logger.created'])
# version check # version check
self.python_version_check() self.python_version_check()
self.setup() self.setup()

View File

@ -6,6 +6,7 @@
'lang.language': '简 体 中 文 zh-cn', 'lang.language': '简 体 中 文 zh-cn',
'logger.language': '日志记录语言为:', 'logger.language': '日志记录语言为:',
'logger.created': '日志处理器创建完成', 'logger.created': '日志处理器创建完成',
'logger.mkdir': 'logs/文件夹不存在,已经新建文件夹',
'logger.main_done': '主日志处理器创建完成', 'logger.main_done': '主日志处理器创建完成',
'logger.logfile_name': '日志文件文件名:', 'logger.logfile_name': '日志文件文件名:',
'logger.logfile_level': '日志文件记录级别:', 'logger.logfile_level': '日志文件记录级别:',

View File

@ -35,6 +35,7 @@
- (witch was `zh-CN`) - (witch was `zh-CN`)
- `crash` now have more information about multiprocess - `crash` now have more information about multiprocess
- add some unused read_input in `client` - add some unused read_input in `client`
- now when `logs/` is not found logger will info `logger.mkdir`
### DEBUG ### DEBUG