Charles M.C. Chan
Committed by Gerrit Code Review

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
......@@ -58,10 +58,15 @@ alias tl='$ONOS_ROOT/tools/dev/bin/onos-local-log'
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'
......
......@@ -31,7 +31,7 @@ else
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
......