Audit Logging

Has anyone managed to get the logging working?
I’ve toggled on the log server, created the log table and toggled on the table settings for Tracking(insert/update/delete) for the groups but nothing is being entered into the table.

Yes, it works. I have it working with the NG clients, Servoy 2020 / 2021 / 2022 and had it working when using Servoy 8.x Smart Client.

If you say “for the groups”: the concept is that security settings are applied on groups and users as well. So if you have a security group for which tracking on some tables is set, you also need to make sure that your user is logged in with that group.
Typically, that is done in the call

security.login(username, a_userUID, groups)

That “groups” parameter must include your “tracking group”.

Another way of enforcing tracking for tables is in code (vs. in developer). For that you can use

security.setSecuritySettings(dataset)

Have a look at https://docs.servoy.com/reference/servo … gs-dataset

There is a short example

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method

That means, table “orders” of database connection “example_data” can be read, inserted, updated, deleted and will be tracked. Obviously, more tables could be added to the array like this.

I hope this helps to sort it out.

That second part helped a lot thank you!
When doing the tracking via code, do you still need to enable tracking on the groups or does it just enable tracking for every user?