summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorBryan Sullivan <bryan.sullivan@att.com>2017-11-27 21:23:13 -0800
committerBryan Sullivan <bryan.sullivan@att.com>2017-11-27 21:23:13 -0800
commitc1a19aa347fb8a68840043e86d80f7124e638f87 (patch)
tree026511b1fcd64d6396b9f2eb62c4dd797bd84842 /build
parentf615fa0f50ab849526434cfe24a25246696df339 (diff)
Add loglevel as env variable
JIRA: VES-2 Change-Id: I909da7f9bc62ba33e5e33bb90d153ec9a425acb8 Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'build')
-rw-r--r--build/ves-agent/start.sh9
-rw-r--r--build/ves-collector/start.sh16
2 files changed, 20 insertions, 5 deletions
diff --git a/build/ves-agent/start.sh b/build/ves-agent/start.sh
index 0476316..fce0c74 100644
--- a/build/ves-agent/start.sh
+++ b/build/ves-agent/start.sh
@@ -38,7 +38,14 @@ EOF
cat ves_app_config.conf
echo "ves_mode=$ves_mode"
-python ves_app.py --events-schema=$ves_mode.yaml --loglevel DEBUG \
+
+if [[ "$ves_loglevel" == "" ]]; then
+ ves_loglevel=ERROR
+fi
+
+python ves_app.py --events-schema=$ves_mode.yaml --loglevel $ves_loglevel \
--config=ves_app_config.conf
+
+# Dump ves_app.log if the command above exits (fails)
echo "*** ves_app.log ***"
cat ves_app.log
diff --git a/build/ves-collector/start.sh b/build/ves-collector/start.sh
index 1c41778..be30c9a 100644
--- a/build/ves-collector/start.sh
+++ b/build/ves-collector/start.sh
@@ -34,7 +34,15 @@ sed -i -- "s~vel_topic_name = example_vnf~vel_topic_name = $ves_topic~g" \
sed -i -- "/vel_topic_name = /a influxdb = $ves_influxdb_host" \
evel-test-collector/config/collector.conf
-python /opt/ves/evel-test-collector/code/collector/monitor.py \
- --config /opt/ves/evel-test-collector/config/collector.conf \
- --influxdb $ves_influxdb_host \
- --section default > /opt/ves/monitor.log 2>&1
+if [[ "$ves_loglevel" != "" ]]; then
+ python /opt/ves/evel-test-collector/code/collector/monitor.py \
+ --config /opt/ves/evel-test-collector/config/collector.conf \
+ --influxdb $ves_influxdb_host \
+ --section default > /opt/ves/monitor.log 2>&1
+else
+ python /opt/ves/evel-test-collector/code/collector/monitor.py \
+ --config /opt/ves/evel-test-collector/config/collector.conf \
+ --influxdb $ves_influxdb_host \
+ --section default
+fi
+