Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > Event Log Size View modes: 
User avatar
Member
Member
Steve-Appetere - 8/13/2009 2:51:57 PM
   
Event Log Size
Hello

The Event Log on my system (v4.0.0 without hotfixes) has 1800 entries when I looked today, whereas I have specified the maximum Log Size as 1000 in:

CMS Site Manager -> Settings -> System -> Log Size

So it would appear that the entries > 1000 in number are not being deleted.

This is quite important as otherwise the log could just keep growing, un-noticed.

It would also be useful (as an enhancement request) if the Event Log had an option to delete a range of entries. At the moment you can only delete everything or nothing, through Kentico. Even something simple like "delete entries older than xxx" would be an improvement.

Regards

Steve

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 8/20/2009 9:17:26 AM
   
RE:Event Log Size
Hi Steve

have you restarted the application after the log size change in settings? It is needed to trigger the scheduled task to prune the exceeding entries.
Later, the number of record varies from 100 to 110 % of the specified size. This is because the scheduled task keeps the log size periodically, not after each added entry.

The percentage spread can be changed in web.config, using key CMSLogKeepPercent

You could also enable logging of events to text file using key CMSLogEventsToFile to keep all entries stored.

Some more details can be found in this DevGuide article - web.config parameters.

Best regards,
Zdenek C.

User avatar
Member
Member
Steve-Appetere - 8/25/2009 10:17:41 AM
   
RE:Event Log Size
Hi Zdenek

I've not changed the Log Size setting recently, and the site has had many restarts (since it uses shared hosting) - the last being just an hour ago.

But .. the log still has around 1800 entries, instead of the ~1000 I would like.

You mention that there is a scheduled task that truncates the log. However, this does not appear in the list of tasks at:

CMS Site Manager -> Administration -> Scheduled tasks

Should the task be in that list? I've checked another installation I have, and it does not appear there either.

If this is the problem, could you provide me with the settings I would need to add a new task to do this log cleaning please?

Thanks,

Steve

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 9/4/2009 8:13:29 AM
   
RE:Event Log Size
Hi Steve,

Please note there are two kind of events - 'global' and 'site related' and you can specify amount of global events when you choose 'global' in dropdownlist in Settings and amount of 'site related' events when you choose particular site in dropdownlist. So if you have specified 1000 as global setting and your site is inheriting this setting there might be 2000 records in total. Could you please check this? You can identify global events in DB by value of SiteID column in CMS_EventLog table ('null' means global event).

Best Regards,

Martin Dobsicek

User avatar
Member
Member
Steve-Appetere - 9/4/2009 8:38:39 AM
   
RE:Event Log Size
Right.. you've got it. That is exactly what was happening. I reduced the individual limits and the event log was correctly truncated.

Many thanks.

Steve