Add MERGE_LOGS for those not wanting to merge server/portal logs
This commit is contained in:
parent
9460614150
commit
4cb3fc7012
2 changed files with 4 additions and 2 deletions
|
|
@ -184,8 +184,8 @@ class Portal(object):
|
||||||
application = service.Application('Portal')
|
application = service.Application('Portal')
|
||||||
|
|
||||||
# custom logging
|
# custom logging
|
||||||
logfile = logger.WeeklyLogFile(os.path.basename(settings.SERVER_LOG_FILE),
|
logfile = settings.SERVER_LOG_FILE if settings.MERGE_LOGS else settings.PORTAL_LOG_FILE
|
||||||
os.path.dirname(settings.SERVER_LOG_FILE))
|
logfile = logger.WeeklyLogFile(os.path.basename(logfile), os.path.dirname(logfile))
|
||||||
application.setComponent(ILogObserver, logger.PortalLogObserver(logfile).emit)
|
application.setComponent(ILogObserver, logger.PortalLogObserver(logfile).emit)
|
||||||
|
|
||||||
# The main Portal server program. This sets up the database
|
# The main Portal server program. This sets up the database
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,8 @@ LOG_DIR = os.path.join(GAME_DIR, 'server', 'logs')
|
||||||
SERVER_LOG_FILE = os.path.join(LOG_DIR, 'server.log')
|
SERVER_LOG_FILE = os.path.join(LOG_DIR, 'server.log')
|
||||||
PORTAL_LOG_FILE = os.path.join(LOG_DIR, 'portal.log')
|
PORTAL_LOG_FILE = os.path.join(LOG_DIR, 'portal.log')
|
||||||
HTTP_LOG_FILE = os.path.join(LOG_DIR, 'http_requests.log')
|
HTTP_LOG_FILE = os.path.join(LOG_DIR, 'http_requests.log')
|
||||||
|
# if this is true, merge logs into only the SERVER_LOG_FILE location.
|
||||||
|
MERGE_LOGS = True
|
||||||
# if this is set to the empty string, lockwarnings will be turned off.
|
# if this is set to the empty string, lockwarnings will be turned off.
|
||||||
LOCKWARNING_LOG_FILE = os.path.join(LOG_DIR, 'lockwarnings.log')
|
LOCKWARNING_LOG_FILE = os.path.join(LOG_DIR, 'lockwarnings.log')
|
||||||
# Rotate log files when server and/or portal stops. This will keep log
|
# Rotate log files when server and/or portal stops. This will keep log
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue