mirror of
https://github.com/evilhero/mylar
synced 2024-12-26 01:26:50 +00:00
IMP: Specifying log file size (within the GUI) has now been fixed and is working with rollovers.
This commit is contained in:
parent
b760c913f7
commit
eeae5e77ea
2 changed files with 5 additions and 6 deletions
|
@ -419,7 +419,7 @@ def initialize():
|
||||||
VERBOSE = 2
|
VERBOSE = 2
|
||||||
else:
|
else:
|
||||||
VERBOSE = 1
|
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:
|
if not MAX_LOGSIZE:
|
||||||
MAX_LOGSIZE = 1000000
|
MAX_LOGSIZE = 1000000
|
||||||
GIT_PATH = check_setting_str(CFG, 'General', 'git_path', '')
|
GIT_PATH = check_setting_str(CFG, 'General', 'git_path', '')
|
||||||
|
|
|
@ -26,7 +26,6 @@ from mylar import helpers
|
||||||
|
|
||||||
# These settings are for file logging only
|
# These settings are for file logging only
|
||||||
FILENAME = 'mylar.log'
|
FILENAME = 'mylar.log'
|
||||||
MAX_SIZE = 1000000 # 1 MB
|
|
||||||
MAX_FILES = 5
|
MAX_FILES = 5
|
||||||
|
|
||||||
# Mylar logger
|
# Mylar logger
|
||||||
|
@ -43,10 +42,10 @@ class LogListHandler(logging.Handler):
|
||||||
mylar.LOG_LIST.insert(0, (helpers.now(), message, record.levelname, record.threadName))
|
mylar.LOG_LIST.insert(0, (helpers.now(), message, record.levelname, record.threadName))
|
||||||
|
|
||||||
def initLogger(verbose=1):
|
def initLogger(verbose=1):
|
||||||
# if mylar.MAX_LOGSIZE:
|
if mylar.MAX_LOGSIZE:
|
||||||
# MAX_SIZE = mylar.MAX_LOGSIZE
|
MAX_SIZE = mylar.MAX_LOGSIZE
|
||||||
# else:
|
else:
|
||||||
# MAX_SIZE = 1000000 # 1 MB
|
MAX_SIZE = 1000000 # 1 MB
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Setup logging for Mylar. It uses the logger instance with the name
|
Setup logging for Mylar. It uses the logger instance with the name
|
||||||
|
|
Loading…
Reference in a new issue