Dave Burke : Freelance .NET Web Developer specializing in Online Communities

CS Nuglet: Extending the life of Eventlog records

Community Server contains an EventLogJob task that removes Eventlog records older than two days.  I use the Eventlog a lot to track custom tasks and various other processes, so I want to retain more than two days' worth of records in my event log.

The CommunityServer.config file <tasks /> area contains the EventLog task configuration.  We could disable the job, but since cleaning out the eventlog periodically is a good idea, we'll add a "days" attribute.  If you look at the EventLogJob task source below, a "days" attribute is supported but not present in the cs.config by default. 

 

 

So we add it as shown below in bold. 


<task name = "EventLog" type = "CommunityServer.Components.EventLogJob,
    CommunityServer.Components" enabled = "true" enableShutDown = "false" days = "10" />

Comments (0) | Post RSS RSS comment feed

Posted on 4/15/2008 7:55:42 AM by Dave Burke
Categories: Community Server
Tags:

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke