Automated EventLog Clearing and Backup Tool

Automated EventLog Clearing and Backup Tool


Developers writing Windows Services would normally heavily use Windows EventsLog to log messages from the application to System,Application, Security etc builtin logs or to custom log sources too. During development the amount of messages getting logged would be enormous and sometimes during development and testing, we normally and frequently right click clear individual logs before re-running the service again.


I just thought instead of repeatedly doing this, let us put a small Windows Application, enumerate all the available System Logs. The user has to simply run the application, select the logs he wants to clear, and hit clear button.


Out of my own interest, I wanted to get some feel of GUI tricks in Windows Forms like ProgressBar and have used some tricks like ThreadPool to update the parent thread to update it.  Tonight I would try to upload to DaffodilNet page at


http://www45.brinkster.com/daffodilnet/eventlogmanager.aspx


TODO:


There are lot of scope of improvement of this tool. Perhaps significant points to improve upon are:


  1. Backup target to EVT (EventLog Native File). I am trying to explore the feasibility with WMI Api in .NET like the ones in System.Management namespace.
  2. Security Checks. If a non-administrative user loads, then instead of attempting the thread and crashing it can proactively say ‘Not all sections of the application are executable by the logged on user, since it needs additional administrative privileges’. Remember, when you run Disk Administrator in Control Panel -> Administrative Tools -> Computer Manager, you see this alert.
  3. Perhaps if you have some suggestion, do send me. I would try to incorporate it.

/* Migrated from namespace LavanyaDeepak — posted on July 30, 2005 */

One thought on “Automated EventLog Clearing and Backup Tool”

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>