From 87fb1214273699a648907b4035caa252071993d7 Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Tue, 10 Jun 2008 20:46:17 +0000 Subject: [PATCH] Make Evennia start correctly on the latest version of Twisted. There is a logging snafu that exists with the latest Twisted, and it was only dumb luck that the server started on previous versions of the framework. The ticket detailing this problem is at: http://twistedmatrix.com/trac/ticket/3289 Let me know if this breaks your setup! --- server.py | 1 - settings.py.dist | 3 --- startup.bat | 2 +- startup.sh | 4 ++-- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/server.py b/server.py index a0c6b72c49..3b572ce58a 100755 --- a/server.py +++ b/server.py @@ -22,7 +22,6 @@ import initial_setup class EvenniaService(service.Service): def __init__(self, filename="blah"): - log.startLogging(open(settings.LOGFILE, 'w')) self.cmd_alias_list = {} self.game_running = True sys.path.append('.') diff --git a/settings.py.dist b/settings.py.dist index 6f2bcb7c38..90de59dfe2 100755 --- a/settings.py.dist +++ b/settings.py.dist @@ -21,9 +21,6 @@ MANAGERS = ADMINS # The path that contains this settings.py file (no trailing slash). BASE_PATH = '/home/evennia/evennia' -# The name of the server log file. -LOGFILE = '%s/logs/evennia.log' % (BASE_PATH) - # Absolute path to the directory that holds media (no trailing slash). # Example: "/home/media/media.lawrence.com" MEDIA_ROOT = '%s/media' % (BASE_PATH) diff --git a/startup.bat b/startup.bat index 784321ea28..7bacd740aa 100644 --- a/startup.bat +++ b/startup.bat @@ -4,4 +4,4 @@ set PYTHONPATH=. echo Starting Evennia... rem We're only going to run in interactive mode until we've had more time to make sure things work as expected on Windows. -twistd -noy server.py \ No newline at end of file +twistd -oy --logfile=- --python=server.py \ No newline at end of file diff --git a/startup.sh b/startup.sh index 9b9b886123..7a2e2384a9 100755 --- a/startup.sh +++ b/startup.sh @@ -11,6 +11,6 @@ mv -f $BASE_PATH/logs/evennia.log $BASE_PATH/logs/evennia.logs.old ## mode instead of having to uncomment crap. ## Interactive mode. Good for development and debugging. -#twistd -noy twistd -ny server.py +#twistd --logfile=- --python=server.py ## Stand-alone mode. Good for running games. -twistd -y server.py +twistd --logfile=logs/evennia.log --python=server.py