EventLogConfiguration Class

Contains static information and configuration settings for an event log. Many of the configurations settings were defined by the event provider that created the log.

System.Object
  System.Diagnostics.Eventing.Reader.EventLogConfiguration

Namespace:  System.Diagnostics.Eventing.Reader
Assembly:  System.Core (in System.Core.dll)

[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
public class EventLogConfiguration : IDisposable

The EventLogConfiguration type exposes the following members.

  NameDescription
Public methodEventLogConfiguration(String)Initializes a new EventLogConfiguration object by specifying the local event log for which to get information and configuration settings.
Public methodEventLogConfiguration(String, EventLogSession)Initializes a new EventLogConfiguration object by specifying the name of the log for which to get information and configuration settings. The log can be on the local computer or a remote computer, based on the event log session specified.
Top

  NameDescription
Public propertyIsClassicLogGets the flag that indicates if the event log is a classic event log. A classic event log is one that has its events defined in a .mc file instead of a manifest (.xml file) used by the event provider.
Public propertyIsEnabledGets or sets a Boolean value that determines whether the event log is enabled or disabled. An enabled log is one in which events can be logged, and a disabled log is one in which events cannot be logged.
Public propertyLogFilePathGets or sets the file directory path to the location of the file where the events are stored for the log.
Public propertyLogIsolationGets an EventLogIsolation value that specifies whether the event log is an application, system, or custom event log.
Public propertyLogModeGets or sets an EventLogMode value that determines how events are handled when the event log becomes full.
Public propertyLogNameGets the name of the event log.
Public propertyLogTypeGets an EventLogType value that determines the type of the event log.
Public propertyMaximumSizeInBytesGets or sets the maximum size, in bytes, that the event log file is allowed to be. When the file reaches this maximum size, it is considered full.
Public propertyOwningProviderNameGets the name of the event provider that created this event log.
Public propertyProviderBufferSizeGets the size of the buffer that the event provider uses for publishing events to the log.
Public propertyProviderControlGuidGets the control globally unique identifier (GUID) for the event log if the log is a debug log. If this log is not a debug log, this value will be null.
Public propertyProviderKeywordsGets or sets keyword mask used by the event provider.
Public propertyProviderLatencyGets the maximum latency time used by the event provider when publishing events to the log.
Public propertyProviderLevelGets or sets the maximum event level (which defines the severity of the event) that is allowed to be logged in the event log. This value is defined by the event provider.
Public propertyProviderMaximumNumberOfBuffersGets the maximum number of buffers used by the event provider to publish events to the event log.
Public propertyProviderMinimumNumberOfBuffersGets the minimum number of buffers used by the event provider to publish events to the event log.
Public propertyProviderNamesGets an enumerable collection of the names of all the event providers that can publish events to this event log.
Public propertySecurityDescriptorGets or sets the security descriptor of the event log. The security descriptor defines the users and groups of users that can read and write to the event log.
Top

  NameDescription
Public methodDispose()Releases all the resources used by this object.
Protected methodDispose(Boolean)Releases the unmanaged resources used by this object, and optionally releases the managed resources.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSaveChangesSaves the configuration settings that
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

If a property is changed for this object, call the SaveChanges method to save the changes.

NoteNote

The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: MayLeakOnAbort. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

For example code using this class, see How to: Configure and Read Event Log Properties.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft