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:
parent
56e474d725
commit
948e40cb29
@ -8,6 +8,9 @@ gerrit_port = 29418
|
||||
debug = True
|
||||
data_dir = /var/data
|
||||
|
||||
[Log]
|
||||
log_dir = /var/log/ciwatch
|
||||
|
||||
[database]
|
||||
connection = sqlite:///:memory
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user