follow_log to dump and follow script related log entries

This commit is contained in:
Gilles Grandou 2022-09-05 09:06:47 +02:00
parent ca092a41c0
commit 60a82354e1
3 changed files with 8 additions and 2 deletions

5
follow_log Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
source $(dirname $0)/shelly.conf
tail -n+0 -f $LOGFILE |egrep -i 'POOL|script'

View File

@ -12,6 +12,9 @@ SCRIPT_NAME="pool"
SCRIPT_FILENAME="pool.js"
SCRIPT_ID=1
# debug log file
LOGFILE=$ROOT_DIR/$SHELLY_HOST.log
# UDP port on which listen for debug messages
# (to be configured on your shelly device)
UDP_LOG_PORT=6901

View File

@ -2,8 +2,6 @@
source $(dirname $0)/shelly.conf
LOGFILE=$SHELLY_HOST.log
while true; do
echo -e "\n======================================================================\n" | tee -a ${LOGFILE}
nc -u -k -l $UDP_LOG_PORT | tee -a ${LOGFILE}