# Cannot add Events on AuditTrail log.dbi file

**URL:** <https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484>\
**Category:** Classic Servoy\
**Created:** [January 23, 2011, 11:39pm UTC](https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484 "2011-01-23T23:39:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [January 23, 2011, 11:39pm UTC](https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484/1 "2011-01-23T23:39:39Z")

</div>

Has anyone tried adding an onRecordInsert, onRecordUpdate or onRecordDelete method on Servoy’s built-in AuditTrail log.dbi?

The methods works if I tried it on other tables but it doesn’t when I use it in log.dbi. I restarted my workstation but it didn’t fix the problem. Did anybody encounter the same problem as mine? Thanks.

---

<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:** [January 24, 2011, 4:09am UTC](https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484/2 "2011-01-24T04:09:52Z")

</div>

Yep. I tried that too a while ago and it didn’t work for me either.  
I suppose it’s normal since events in the log\_server wouldn’t know which solution to callback since the logs can be coming from a number of concurrent solutions…

---

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [January 24, 2011, 4:47am UTC](https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484/3 "2011-01-24T04:47:06Z")

</div>

> ptalbot:  
> Yep. I tried that too a while ago and it didn’t work for me either.  
> I suppose it’s normal since events in the log\_server wouldn’t know which solution to callback since the logs can be coming from a number of concurrent solutions…

Thanks for sharing your investigation results.

---

<div class="post-metadata">

**Author:** ![pbakker](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pbakker](https://forum.servoy.com/u/pbakker)\
**Post date:** [February 8, 2011, 10:47am UTC](https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484/4 "2011-02-08T10:47:30Z")

</div>

The logging doesn’t happen in the Client, as that would be way too much overhead.

Your table events would only be fired if you do CUD operations directly on the log table from within your client, which defies the purpose of the logtable.

Paul

---

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [February 11, 2011, 3:34am UTC](https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484/5 "2011-02-11T03:34:55Z")

</div>

> pbakker:  
> The logging doesn’t happen in the Client, as that would be way too much overhead.
> 
> Your table events would only be fired if you do CUD operations directly on the log table from within your client, which defies the purpose of the logtable.
> 
> Paul

Hi Paul, does this mean that if I add codes in any event of any dbi file, these codes are executed on the server?

---

<div class="post-metadata">

**Author:** ![pbakker](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pbakker](https://forum.servoy.com/u/pbakker)\
**Post date:** [February 14, 2011, 8:57am UTC](https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484/6 "2011-02-14T08:57:31Z")

</div>

No

Logging is done on the Server, not in the client, so the logging mechanism doesn’t know about any code in table events, because those table events are run in the client.

Only when you would interact with the log table from within a client (for example have a a form build on top of the log table and allow users to insert/update/delete), then the table events would fire, but of course only for the actions done by the client.

Paul

---

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [February 14, 2011, 10:10pm UTC](https://forum.servoy.com/t/cannot-add-events-on-audittrail-log-dbi-file/13484/7 "2011-02-14T22:10:59Z")

</div>

> pbakker:  
> No
> 
> Logging is done on the Server, not in the client, so the logging mechanism doesn’t know about any code in table events, because those table events are run in the client.
> 
> Only when you would interact with the log table from within a client (for example have a a form build on top of the log table and allow users to insert/update/delete), then the table events would fire, but of course only for the actions done by the client.
> 
> Paul

This is the exact explanation I need. Thanks!
