
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
456
|
Chapter 8: Diagnostics
If any of these logs is deleted, so are the sources registered with the particular log.
Once the log is deleted, it is permanent; believe us, it is not fun to try and re-create
the log and its sources without a backup.
As a last note, the
EventIDType and CategoryType enumerations are designed mainly
to log security-type breaches as well as potential attacks on the security of your appli-
cation. Using these event IDs and categories, the administrator can more easily track
down potential security threats and do postmortem analysis after security is
breached. These enumerations can easily be modified or replaced with your own to
allow you to track different events that occur as a result of your application running.
You should minimize the number of entries written to the event log
from your application. The reason for this is that writing to the event
log causes a performance hit. Writing too much information to the
event log can noticeably slow your application. Pick and choose the
entries you write to the event log wisely.
See Also
See Recipe 8.9; see the “EventLog Class” topic in the MSDN documentation.
8.7 Changing the Maximum Size
of a Custom Event Log
Problem
Custom event logs are created with a default maximum size of 512K. For some appli-
cations, this default ...