summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYun Huang <yun.huang@windriver.com>2018-03-09 10:04:54 +0800
committerYun Huang <yun.huang@windriver.com>2018-03-09 10:04:54 +0800
commitb3a1192df1c3d87abf6fad172915877447290e91 (patch)
treecf8e1e4fd72fd2b555f75e56536108158bbe5bd0
parent2dce2e514f236316b185608989c297e9720a228a (diff)
Change the log filepath of Ocata
As required by logging project Change-Id: Ie19af29f68d5d482e65c7d0d488d8e4e885c2b5b Issue-ID: MULTICLOUD-178 Signed-off-by: Yun Huang <yun.huang@windriver.com>
-rw-r--r--ocata/ocata/settings.py11
-rw-r--r--ocata/run.sh8
2 files changed, 15 insertions, 4 deletions
diff --git a/ocata/ocata/settings.py b/ocata/ocata/settings.py
index efb0296e..9f5711d6 100644
--- a/ocata/ocata/settings.py
+++ b/ocata/ocata/settings.py
@@ -91,7 +91,7 @@ LOGGING = {
'ocata_handler': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
- 'filename': os.path.join(BASE_DIR, 'logs/runtime_ocata.log'),
+ 'filename': '/var/log/onap/multicloud/openstack/ocata/ocata.log',
'formatter': 'standard',
'maxBytes': 1024 * 1024 * 50,
'backupCount': 5,
@@ -104,7 +104,12 @@ LOGGING = {
'level': 'DEBUG',
'propagate': False
},
- 'newton': {
+ 'newton_base': {
+ 'handlers': ['ocata_handler'],
+ 'level': 'DEBUG',
+ 'propagate': False
+ },
+ 'common': {
'handlers': ['ocata_handler'],
'level': 'DEBUG',
'propagate': False
@@ -147,6 +152,8 @@ MULTIVIM_VERSION = "multicloud-" + OPENSTACK_VERSION
if 'test' in sys.argv:
+ LOGGING['handlers']['ocata_handler']['filename'] = 'logs/ocata.log'
+
REST_FRAMEWORK = {}
import platform
diff --git a/ocata/run.sh b/ocata/run.sh
index a4edae47..f1bcfa9a 100644
--- a/ocata/run.sh
+++ b/ocata/run.sh
@@ -17,9 +17,13 @@ memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid
export PYTHONPATH=lib/share
nohup python manage.py runserver 0.0.0.0:9006 2>&1 &
-while [ ! -f logs/runtime_ocata.log ]; do
+logDir="/var/log/onap/multicloud/openstack/ocata"
+if [ ! -x $logDir ]; then
+ mkdir -p $logDir
+fi
+while [ ! -f $logDir/ocata.log ]; do
sleep 1
done
-tail -F logs/runtime_ocata.log
+tail -F $logDir/ocata.log