API
Version 7.x > API > Turn off logging on CRUD activities View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 11/28/2012 1:00:17 PM
   
Turn off logging on CRUD activities
I've got a scheduled task that runs a few times per day and deletes and inserts data into custom tables using the API. I can delete and insert upwards of a couple thousand rows a few times per day. Everytime an insert or delete takes place, the API writes an event log for that action. How can I override this so it doesn't write an event log item (not needed)?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 12/2/2012 8:39:54 AM
   
RE:Turn off logging on CRUD activities
Hi,

You would have to modify the user interface to achieve such a behavior. In this case, the file CMSModules/EventLog/EventLog.aspx.cs or CMSModules/EventLog/Controls/EventLog.ascx.

Best regards,
Martin Danko

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 12/2/2012 11:07:52 AM
   
RE:Turn off logging on CRUD activities
It's not that I don't want them to show in the log, I don't want to write the records in the database at all. For instance, when I perform an insert into my custom table, it also inserts an event log record, I dont' want this record inserted. If this isn't available, I will suggest adding another overloaded method with another parameter (bool LogEvent).

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 12/4/2012 7:12:49 AM
   
RE:Turn off logging on CRUD activities
Hi,

the only solution for now is probably to delete periodically selected logs, take a look at the example code in another thread: http://devnet.kentico.com/Forums/f65/t32769/Exclude-a-user-from-even-log.aspx

There is no other option to filter logs in the current version of Kentico but we have already planned this funcionality for one of the future versions.

Best regards,
Martin Danko