Wednesday, March 13, 2013

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

No comments:

Post a Comment