How to: Configure and Read Event Log Properties
.NET Framework 3.5
You can configure and read properties of an event log to manage how the log stores events. The EventLogConfiguration class contains the event log properties that can be read and set by your application.
Example
Description
The following code example uses the EventLogInformation and EventLogConfiguration classes to set how events are stored in a log after the log has reached its maximum size. The following code example also shows you how to read event log properties such as the path to the log file and the size of the log file.
Code
Compiling the Code
The following code example requires references to the System.dll and System.Core.dll files.
See Also
Copyright © 2007 by Microsoft Corporation. All rights reserved.
Community Additions
Show: