Hi all,
I have a special requirement for logging all changes in a system we are currently designing.
It is a membership management system where the main entity is a member, and where lots of tables and relations belong to this entity which can be considered as the root of all the rest.
I thought of using the Log Server built-in mechanism but quickly found myself faced with a problem.
We can easily use the logging facilities of Servoy to know which tables and columns have been inserted/updated/deleted and by whom.
Now the thing is that we need to show these logs based on the main entity which has been modified: to recreated a history of modifications by member… but the Log Server doesn’t allow storing additional information based on the context.
We tried using the table events to modify the records inserted in the Log Server log table (with events on the Log Server log table itself), but these events are not fired at the solution level. What we wanted to achieve was to add a “root_id” column and feed it with a global variable when a new row is inserted in the log table.
Without this information, it will be very difficult, if only in terms of performance, to get all the related rows of the log table based on a multitude or inverse relations.
I wonder if anyone has ever had this kind of requirements and how they have been addressed? Short of forgetting the Servoy log mechanism all in all and rolling up our own logging (which will be difficult since we will have to double all relations with their inverse relations up to the root, and update our log table based on iteration on all edited records, basically reinventing the wheel), I have no idea how to do that.
So I was wondering if it would be possible to add a mechanism in Servoy to allow custom data to be added in the log server, based on a global event ‘onInsertLog(event)’ for example, or any other kind of insertion mechanism.