Here’s a recent discussion that should help.
Didn’t read your question closely enough.
You trigger on add/update/delete not commit.
The add/update/delete makes the file changes but keeps the records locked
The Commit releases the locks and moves the boundry in the journal but doesn’t fire a trigger.
On the other hand, you could call a program at the point of the commit.
The journal will recieve each file update and if a rollback occurs the journal will recieve the roll back for each file that was changed. The journal has integrity.
Apparently your trigger is writting to a log file, you may want to write to the log file also when you commit or rollback but you cann’t do these with a trigger.