Log Server enhancement

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.

What we could provide is something like:
application.setTrackingInfo(String key,String info)
where this info ends-up as additional row in log table for each record tracked for this client.

Would this help?

Jan Blok:
What we could provide is something like:
application.setTrackingInfo(String key,String info)
where this info ends-up as additional row in log table for each record tracked for this client.

Would this help?

We could then call this method before each call to saveData, is that it?
Then yes, that would be a tremendous help!

Should I open a case in the support system?

It would be rememberd for the duration of the session, calling each time would not be needed then I guess? your root_Id does not change for every record I suppose?
Yes please file a feature req.

Jan Blok:
It would be rememberd for the duration of the session, calling each time would not be needed then I guess? your root_Id does not change for every record I suppose?
Yes please file a feature req.

Not for every record, but the idea is that one administrator can change many members, so each time they act on a member, the root_id is set to it, if they change to modifiy another member, we track for a new root_id… So it will change inside a session.
Still possible, using your proposition?

yep, please refer to this forum topic as well in FR

Jan Blok:
yep, please refer to this forum topic as well in FR

Great, thanks, will do!

Hi all,
This enhancement will be very very handy.
Thank you

madimane:
Hi all,
This enhancement will be very very handy.
Thank you

I think so too!

Case #296426 created.