Log tools improvement
- Add 'olo' command to filter log of remote ONOS instance
- Modify 'onos-log' such that it can run on OSX
Change-Id: Iddab996564af01672c14caca725397c574267bad
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index 7279ebe..92b3e92 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -58,10 +58,15 @@
alias ll='less $KARAF_LOG'
alias gl='grep $KARAF_LOG --colour=auto -E -e '
-function filterLog {
+function filterLocalLog {
tl | grep --colour=always -E -e "${1-org.onlab|org.onosproject}"
}
-alias tlo='filterLog'
+alias tlo='filterLocalLog'
+
+function filterLog {
+ ol | grep --colour=always -E -e "${1-org.onlab|org.onosproject}"
+}
+alias olo='filterLog'
# Pretty-print JSON output
alias pp='python -m json.tool'
diff --git a/tools/test/bin/onos-log b/tools/test/bin/onos-log
index b8c5bf4..6e1d142 100755
--- a/tools/test/bin/onos-log
+++ b/tools/test/bin/onos-log
@@ -31,7 +31,7 @@
while true; do
echo ==================================================================
[ ! -f $LOG ] && sleep 2 && continue
- tail -n 512 --follow=name $LOG --pid \$$ --sleep-interval 2
+ tail -n 512 -f -F $LOG
done
"
fi