onos-local-log now works with buck run
Change-Id: I086ed7e4825ba19d920815f5946bf778bb90f3c6
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index 4999963..79f80f2 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -59,7 +59,7 @@
alias obi=deprecatedAlias
alias obs=deprecatedAlias
-alias ok='buck run onos-local'
+alias ok='buck run onos-local --'
alias oh='onos localhost halt'
alias ol='onos-log'
diff --git a/tools/dev/bin/onos-local-log b/tools/dev/bin/onos-local-log
index a17d3b9..d7f0c7e 100755
--- a/tools/dev/bin/onos-local-log
+++ b/tools/dev/bin/onos-local-log
@@ -2,7 +2,9 @@
# ----------------------------------------------------------------------------
# Continuously watches the Apache Karaf log; survives 'karaf clean'
# ----------------------------------------------------------------------------
-KARAF_LOG=${KARAF_LOG:-~/apache-karaf-$KARAF_VERSION/data/log/karaf.log}
+. $ONOS_ROOT/tools/build/envDefaults
+
+KARAF_LOG=/tmp/onos-$ONOS_POM_VERSION/apache-karaf-$KARAF_VERSION/data/log/karaf.log
while true; do
[ ! -f $KARAF_LOG ] && sleep 2 && continue