Further improvement of log conditional

This commit is contained in:
Griatch 2022-02-14 00:34:13 +01:00
parent 39368bc9ae
commit 4e2962fef8
5 changed files with 17 additions and 17 deletions

View file

@ -647,9 +647,9 @@ except OperationalError:
# what to execute from.
application = service.Application("Evennia")
if ("--nodaemon" not in sys.argv
and not (hasattr(settings, "_TEST_ENVIRONMENT") and settings._TEST_ENVIRONMENT)):
# custom logging, but only if we are not running in interactive mode
if "--nodaemon" not in sys.argv and "test" not in sys.argv:
# activate logging for interactive/testing mode
logfile = logger.WeeklyLogFile(
os.path.basename(settings.SERVER_LOG_FILE),
os.path.dirname(settings.SERVER_LOG_FILE),