Add support for DEBUG flag
This commit is contained in:
@@ -202,12 +202,14 @@ while true
|
|||||||
do
|
do
|
||||||
if read RECORD
|
if read RECORD
|
||||||
then
|
then
|
||||||
|
if [[ "$DEBUG" == "1" ]]
|
||||||
|
then
|
||||||
|
echo "$(ts) [DEBUG] $RECORD"
|
||||||
|
fi
|
||||||
|
|
||||||
EVENT=$(echo "$RECORD" | cut -d' ' -f 1)
|
EVENT=$(echo "$RECORD" | cut -d' ' -f 1)
|
||||||
FILE=$(echo "$RECORD" | cut -d' ' -f 2-)
|
FILE=$(echo "$RECORD" | cut -d' ' -f 2-)
|
||||||
|
|
||||||
# echo "EVENT=$EVENT"
|
|
||||||
# echo "FILE=$FILE"
|
|
||||||
|
|
||||||
if ! is_change_event "$EVENT" "$FILE"
|
if ! is_change_event "$EVENT" "$FILE"
|
||||||
then
|
then
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -38,3 +38,6 @@ UMASK=0
|
|||||||
# most programs don't worry about checking the current state before making a change. e.g. chmod will set the mode of a
|
# most programs don't worry about checking the current state before making a change. e.g. chmod will set the mode of a
|
||||||
# file even if it already has that mode.
|
# file even if it already has that mode.
|
||||||
IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=1
|
IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=1
|
||||||
|
|
||||||
|
# Set this to 1 to log all events, for debugging purposes. WARNING! This creates copious amounts of confusing logging!
|
||||||
|
DEBUG_EVENTS=0
|
||||||
|
|||||||
Reference in New Issue
Block a user