diff --git a/monitor.sh b/monitor.sh index 63f3a1b..4a2469d 100755 --- a/monitor.sh +++ b/monitor.sh @@ -202,12 +202,14 @@ while true do if read RECORD then + if [[ "$DEBUG" == "1" ]] + then + echo "$(ts) [DEBUG] $RECORD" + fi + EVENT=$(echo "$RECORD" | cut -d' ' -f 1) FILE=$(echo "$RECORD" | cut -d' ' -f 2-) -# echo "EVENT=$EVENT" -# echo "FILE=$FILE" - if ! is_change_event "$EVENT" "$FILE" then continue diff --git a/sample.conf b/sample.conf index 2aa50f3..70348fc 100644 --- a/sample.conf +++ b/sample.conf @@ -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 # file even if it already has that mode. 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