# Implementing Audit Logging without using security

**URL:** <https://forum.servoy.com/t/implementing-audit-logging-without-using-security/15995>\
**Category:** Classic Servoy\
**Created:** [June 4, 2012, 8:04pm UTC](https://forum.servoy.com/t/implementing-audit-logging-without-using-security/15995 "2012-06-04T20:04:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfernandez](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dfernandez](https://forum.servoy.com/u/dfernandez)\
**Post date:** [June 4, 2012, 8:04pm UTC](https://forum.servoy.com/t/implementing-audit-logging-without-using-security/15995/1 "2012-06-04T20:04:22Z")

</div>

Hi,

I’m trying to use Audit Logging with Servoy. In Servoy Developer I have checked the Log Server option in one of my Database Servers and the log table was created but nothing is generated into that table.

My solution is not using security. Is not possible to use Audit Logging without loging into Servoy security?

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [June 4, 2012, 8:30pm UTC](https://forum.servoy.com/t/implementing-audit-logging-without-using-security/15995/2 "2012-06-04T20:30:57Z")

</div>

Audit log is activated at the table level: see the ‘Security’ tab of the tables.  
You will see that it can be activated based on groups (choose explicit, then check the ‘Tracking’ options).  
Since this is based on group, you will have to login, but you can do that on a default user using security.login(‘aDefaultUser’, anID, [‘agroupWithTracking’]);  
Note that once deployed to a real server, security will be enforced by the Servoy server anyway, so you must have some login set in your solution in any case.

---

<div class="post-metadata">

**Author:** ![dfernandez](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dfernandez](https://forum.servoy.com/u/dfernandez)\
**Post date:** [June 5, 2012, 10:33pm UTC](https://forum.servoy.com/t/implementing-audit-logging-without-using-security/15995/3 "2012-06-05T22:33:19Z")

</div>

Thanks Patrick!

Now audit logging is working but I still need to know what user (from my own login form because I’m not using Servoy security) has changed data.

I tried adding a column to Log table called realuser with a calculation with return globals.globaluser (that has the real user logged into the solution) but null is written. Is it possible to add a column to the Log table and write data into it?

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [June 5, 2012, 10:58pm UTC](https://forum.servoy.com/t/implementing-audit-logging-without-using-security/15995/4 "2012-06-05T22:58:18Z")

</div>

Yes you can add your own column to the log table and fill it using any info you like: Have a look at databaseManager.addTrackingInfo(columnName, value), you should call this one before any call to dabaseManager.saveData()

---

<div class="post-metadata">

**Author:** ![dfernandez](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dfernandez](https://forum.servoy.com/u/dfernandez)\
**Post date:** [June 6, 2012, 3:52pm UTC](https://forum.servoy.com/t/implementing-audit-logging-without-using-security/15995/5 "2012-06-06T15:52:03Z")

</div>

Great !!!

Thank you very much Patrick. ![:D]( "Very Happy")
