Sometimes it’s needed to have a simple logging mechanism, especially, if you want to find a hard to find bug, the exact place of the bug. For that i wrote a simple logging function. Add the fct. to a couple of code positions giving the current name of the trigger as parameter. At the end you get a long list of logging entries, with which it is quite easy to check what’s going on in your code.