EventLog ModifyOverflowPolicy

   EventLog log = new EventLog(LogName);
   log.ModifyOverflowPolicy(OverflowAction.OverwriteAsNeeded, 7);
   log.MaximumKilobytes = 640000;

Read: http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.modifyoverflowpolicy.aspx

Comments

Popular posts from this blog

Convert XElement to DataTable

Enable mouse scroll-wheel in VB6

C# code to Check IE Proxy Settings