summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/dev/bin/onos-local-log
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/tools/dev/bin/onos-local-log')
-rwxr-xr-xframework/src/onos/tools/dev/bin/onos-local-log10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/src/onos/tools/dev/bin/onos-local-log b/framework/src/onos/tools/dev/bin/onos-local-log
new file mode 100755
index 00000000..a17d3b9c
--- /dev/null
+++ b/framework/src/onos/tools/dev/bin/onos-local-log
@@ -0,0 +1,10 @@
+#!/bin/bash
+# ----------------------------------------------------------------------------
+# Continuously watches the Apache Karaf log; survives 'karaf clean'
+# ----------------------------------------------------------------------------
+KARAF_LOG=${KARAF_LOG:-~/apache-karaf-$KARAF_VERSION/data/log/karaf.log}
+
+while true; do
+ [ ! -f $KARAF_LOG ] && sleep 2 && continue
+ tail -n 512 -f -F $KARAF_LOG
+done