Browse Source

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
changes/50/252050/5
apoorvad 4 years ago
parent
commit
948e40cb29
3 changed files with 6 additions and 1 deletions
  1. +3
    -0
      ciwatch.conf.sample
  2. +2
    -0
      ciwatch/config.py
  3. +1
    -1
      ciwatch/log.py

+ 3
- 0
ciwatch.conf.sample 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


+ 2
- 0
ciwatch/config.py 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:

+ 1
- 1
ciwatch/log.py 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')

Loading…
Cancel
Save