[Enhance][Bug fix] Add log db & log bug

- Add a log database to record all playing scores
- Fix a bug that if an exception is raised before flask app runs, logger will not work well.
This commit is contained in:
Lost-MSth
2022-11-26 21:03:29 +08:00
parent 84b0e869a5
commit a7a9a4ba3d
8 changed files with 92 additions and 18 deletions

View File

@@ -182,7 +182,8 @@ def main():
dictConfig(log_dict)
if not FileChecker(app).check_before_run():
Connect.logger = app.logger
if not FileChecker(app.logger).check_before_run():
app.logger.error('Something wrong. The server will not run.')
input('Press ENTER key to exit.')
sys.exit()