Debugging oxidized syslog trigger call

Continuing this discussion:

The sleep option is good enough for me, however I was not able to get it work. Regex matching is correct, included script is working correctly.
However if I copy that script to another location and modify it, it is not working.
Really hard to tell what part is not working, because I could not find a way to get some output from this script run.
It might be php import related (modified import statements to be correct) or any other script error.

Is there a way to debug this easily?

Delay will not work as I would like it. It will just delay all execution request.
I need something that in a 10 minute timeframe, maximum 1 execution will be executed

I was able to exclude some lines by regex which are not required in my case to run the config refresh, but a more scalable solution would be great

I’m still not sure how I could squash config changes which happens in a short time.
Does anyone has idea for this?