I would like to set up a log system in which all user changes to the various queries are saved.
Here’s an example
$user changed in area $area [$timestamp]:
$variable1 from value1 to value2
$variable2 from value2 to value4
$variable3 from value3 to value6
$variable4 from value5 to value8
Fastest way is to setup a SQL trigger with custom code.
Recently we found system versioning on MariaDB, so you can try that if you are using MariaDB. But we had to create a custom extension to convert the logged data in the format you are expecting. Complex stuff.
Worst way is the add steps just before the update query and check each an every variable’s value and insert into DB if a difference is found.
Triggers, from what I have read, are not good for performance. It has been a few years since I last used them.
The team would know better, and if it makes sense, then definitely worth adding.