1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-25 17:16:51 +00:00

IMP: Specifying log file size (within the GUI) has now been fixed and is working with rollovers.

This commit is contained in:
evilhero 2014-12-01 12:17:08 -05:00
parent b760c913f7
commit eeae5e77ea
2 changed files with 5 additions and 6 deletions

View file

@ -419,7 +419,7 @@ def initialize():
VERBOSE = 2
else:
VERBOSE = 1
MAX_LOGSIZE = check_setting_str(CFG, 'General', 'max_logsize', '')
MAX_LOGSIZE = check_setting_int(CFG, 'General', 'max_logsize', 1000000)
if not MAX_LOGSIZE:
MAX_LOGSIZE = 1000000
GIT_PATH = check_setting_str(CFG, 'General', 'git_path', '')

View file

@ -26,7 +26,6 @@ from mylar import helpers
# These settings are for file logging only
FILENAME = 'mylar.log'
MAX_SIZE = 1000000 # 1 MB
MAX_FILES = 5
# Mylar logger
@ -43,10 +42,10 @@ class LogListHandler(logging.Handler):
mylar.LOG_LIST.insert(0, (helpers.now(), message, record.levelname, record.threadName))
def initLogger(verbose=1):
# if mylar.MAX_LOGSIZE:
# MAX_SIZE = mylar.MAX_LOGSIZE
# else:
# MAX_SIZE = 1000000 # 1 MB
if mylar.MAX_LOGSIZE:
MAX_SIZE = mylar.MAX_LOGSIZE
else:
MAX_SIZE = 1000000 # 1 MB
"""
Setup logging for Mylar. It uses the logger instance with the name