Change ciwatch.log location

In order to make puppet-ciwatch in sync with ciwatch, change
the log file location to /var/log/ciwatch/ciwatch.log from
/var/lib/ciwatch/ciwatch.log

Change-Id: Id3713cbafca3f87db0cf24dc00e800b56e148a41
This commit is contained in:
apoorvad 2015-12-01 12:22:38 -08:00
parent 56e474d725
commit 948e40cb29
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')