Correctly route twisted logs at startup for new game folder

This commit is contained in:
Griatch 2022-12-03 15:26:01 +01:00
parent be9faf707d
commit 7d0539fcf1
2 changed files with 10 additions and 3 deletions

View file

@ -538,8 +538,16 @@ def _get_twistd_cmdline(pprofiler, sprofiler):
Compile the command line for starting a Twisted application using the 'twistd' executable.
"""
portal_cmd = [TWISTED_BINARY, "--python={}".format(PORTAL_PY_FILE)]
server_cmd = [TWISTED_BINARY, "--python={}".format(SERVER_PY_FILE)]
portal_cmd = [
TWISTED_BINARY,
f"--python={PORTAL_PY_FILE}",
"--logger=evennia.utils.logger.GetPortalLogObserver",
]
server_cmd = [
TWISTED_BINARY,
f"--python={SERVER_PY_FILE}",
"--logger=evennia.utils.logger.GetServerLogObserver",
]
if os.name != "nt":
# PID files only for UNIX

View file

@ -31,7 +31,6 @@ from django.conf import settings
from django.db import connection
from django.db.utils import OperationalError
from django.utils.translation import gettext as _
from evennia.accounts.models import AccountDB
from evennia.scripts.models import ScriptDB
from evennia.server.models import ServerConfig