Add better logging to falling back to default language on server start.

This commit is contained in:
Andrew 2021-11-27 12:53:29 -05:00
parent b99f0f502e
commit e21a019de4
2 changed files with 4 additions and 1 deletions

View File

@ -373,7 +373,7 @@ class Server:
if self.settings['crash_detection']:
logger.warning("The server {} has crashed and will be restarted. Restarting server".format(name))
console.warning("The server {} has crashed and will be restarted. Restarting server".format(name))
self.run_threaded_server('en_EN')
self.run_threaded_server(helper.get_setting('language'))
return True
else:
logger.critical(

View File

@ -102,6 +102,9 @@ class TasksManager:
command = c.get('command', None)
if command == 'start_server':
if user_lang is None:
logger.warning('Could not capture user language from request. Falling back to default language from config file.')
user_lang = helper.get_setting('language')
svr.run_threaded_server(user_lang)
elif command == 'stop_server':