Make log rotation also limited by size and controllable from settings. Resolves #2041
This commit is contained in:
parent
f124b3510b
commit
ff16eb1bfe
13 changed files with 98 additions and 40 deletions
|
|
@ -616,7 +616,8 @@ application = service.Application("Evennia")
|
|||
if "--nodaemon" not in sys.argv:
|
||||
# custom logging, but only if we are not running in interactive mode
|
||||
logfile = logger.WeeklyLogFile(
|
||||
os.path.basename(settings.SERVER_LOG_FILE), os.path.dirname(settings.SERVER_LOG_FILE)
|
||||
os.path.basename(settings.SERVER_LOG_FILE), os.path.dirname(settings.SERVER_LOG_FILE),
|
||||
day_rotation=settings.SERVER_LOG_DAY_ROTATION, max_size=settings.SERVER_LOG_MAX_SIZE
|
||||
)
|
||||
application.setComponent(ILogObserver, logger.ServerLogObserver(logfile).emit)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue