mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Make lockwarning log file name settable; turn off if not set. Resolves #1161.
This commit is contained in:
parent
9e505b9b72
commit
b57b807da6
2 changed files with 4 additions and 2 deletions
|
|
@ -114,7 +114,7 @@ from django.utils.translation import ugettext as _
|
|||
|
||||
__all__ = ("LockHandler", "LockException")
|
||||
|
||||
WARNING_LOG = "lockwarnings.log"
|
||||
WARNING_LOG = settings.LOCKWARNING_LOG_FILE
|
||||
|
||||
#
|
||||
# Exception class. This will be raised
|
||||
|
|
@ -247,7 +247,7 @@ class LockHandler(object):
|
|||
wlist.append(_("LockHandler on %(obj)s: access type '%(access_type)s' changed from '%(source)s' to '%(goal)s' " % \
|
||||
{"obj":self.obj, "access_type":access_type, "source":locks[access_type][2], "goal":raw_lockstring}))
|
||||
locks[access_type] = (evalstring, tuple(lock_funcs), raw_lockstring)
|
||||
if wlist:
|
||||
if wlist and WARNING_LOG:
|
||||
# a warning text was set, it's not an error, so only report
|
||||
logger.log_file("\n".join(wlist), WARNING_LOG)
|
||||
if elist:
|
||||
|
|
|
|||
|
|
@ -119,6 +119,8 @@ LOG_DIR = os.path.join(GAME_DIR, 'server', 'logs')
|
|||
SERVER_LOG_FILE = os.path.join(LOG_DIR, 'server.log')
|
||||
PORTAL_LOG_FILE = os.path.join(LOG_DIR, 'portal.log')
|
||||
HTTP_LOG_FILE = os.path.join(LOG_DIR, 'http_requests.log')
|
||||
# if this is set to the empty string, lockwarnings will be turned off.
|
||||
LOCKWARNING_LOG_FILE = os.path.join(LOG_DIR, 'lockwarnings.log')
|
||||
# Rotate log files when server and/or portal stops. This will keep log
|
||||
# file sizes down. Turn off to get ever growing log files and never
|
||||
# loose log info.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue