Event Logs

Brenden Kehren asked on March 28, 2014 08:03

What customizations have others done to the event log to add a flag to say if an event was read or acknowledged or not? Ideally I'd like a simple boolean to say IsAcknowledged true/false. The client has a 3rd party system that logs their events and I've setup a scheduled task to export only errors to the external system. I don't want to re-export the same errors so I need to do something with the ones that were already exported. Here are a few things I've done to try to "flag" the records:

  • delete the error records after export. I've since found the deletion of the records isn't a good approach for others maintaining the CMS.
  • so now I'm changing the EventType from "E" (Error) to "W" (warning). Again, not the best approach as it's deceiving.
  • I've modified the CMS_EventLog table via the System Tables (changed the ClassShowAsSystemTable = 1 in CMS_Class) to include a flag although this doesn't seem to be working as I'd expect. For some reason it appears the table is reverting back to the original schema.

Any suggestions?

Correct Answer

gitesh KudosWeb answered on March 30, 2014 06:24


It can be done in different ways, but one easy way would be: You could create a new table "TableA" in database with only 1 column called "LastExportedEventLogID". When you are exporting the event logs update TableA with the Last Event log ID. And when you start exporting the event logs next time you know which once to send as you have got the last exported event log ID.

By doing this you are not modifying any of the kentico tables.

Cheers Gitesh Shah

1 votesVote for this answer Unmark Correct answer

Recent Answers

Brenden Kehren answered on March 31, 2014 06:24

Sometimes you forget about the simple things, thanks Gitesh.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.