follow_log to dump and follow script related log entries
This commit is contained in:
parent
ca092a41c0
commit
60a82354e1
5
follow_log
Executable file
5
follow_log
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source $(dirname $0)/shelly.conf
|
||||||
|
|
||||||
|
tail -n+0 -f $LOGFILE |egrep -i 'POOL|script'
|
@ -12,6 +12,9 @@ SCRIPT_NAME="pool"
|
|||||||
SCRIPT_FILENAME="pool.js"
|
SCRIPT_FILENAME="pool.js"
|
||||||
SCRIPT_ID=1
|
SCRIPT_ID=1
|
||||||
|
|
||||||
|
# debug log file
|
||||||
|
LOGFILE=$ROOT_DIR/$SHELLY_HOST.log
|
||||||
|
|
||||||
# UDP port on which listen for debug messages
|
# UDP port on which listen for debug messages
|
||||||
# (to be configured on your shelly device)
|
# (to be configured on your shelly device)
|
||||||
UDP_LOG_PORT=6901
|
UDP_LOG_PORT=6901
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
source $(dirname $0)/shelly.conf
|
source $(dirname $0)/shelly.conf
|
||||||
|
|
||||||
LOGFILE=$SHELLY_HOST.log
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo -e "\n======================================================================\n" | tee -a ${LOGFILE}
|
echo -e "\n======================================================================\n" | tee -a ${LOGFILE}
|
||||||
nc -u -k -l $UDP_LOG_PORT | tee -a ${LOGFILE}
|
nc -u -k -l $UDP_LOG_PORT | tee -a ${LOGFILE}
|
||||||
|
Loading…
Reference in New Issue
Block a user