Merge "Change ciwatch.log location"

This commit is contained in:
Jenkins 2015-12-08 19:02:35 +00:00 committed by Gerrit Code Review
commit 6997457f08
3 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,9 @@ gerrit_port = 29418
debug = True
data_dir = /var/data
[Log]
log_dir = /var/log/ciwatch
[database]
connection = sqlite:///:memory

View File

@ -21,6 +21,8 @@ class Config(object):
def __init__(self):
self.cfg = self.get_config()
if not self.cfg.Log.log_dir:
self.cfg.Log.log_dir = '/var/log/ciwatch'
if self.cfg.Data.data_dir:
self.DATA_DIR = self.cfg.Data.data_dir
else:

View File

@ -38,4 +38,4 @@ def setup_logger(name):
return logger
logger = setup_logger(config.DATA_DIR + '/ciwatch.log')
logger = setup_logger(config.cfg.Log.log_dir + '/ciwatch.log')