Export (0) Print
Expand All

Instrumenting the Logging Application Block

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

These are the sections in the application's configuration file for enabling/disabling instrumentation. They are optional, but you must either have both or neither in the file. If you omit them, it is the same as if all the values are false. The <configSections> section is where you tell the System.Configuration library how to read the actual configuration data. The actual data is in the <instrumentationConfiguration> section. Setting a value to true enables the instrumentation. Setting a value to false disables the instrumentation. The three types of instrumentation are performance counters, event logging, and WMI events.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
      <configSections>
         <section name="instrumentationConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.Configuration.InstrumentationConfigurationSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null" />
      </configSections>
  <instrumentationConfiguration performanceCountersEnabled="true" eventLoggingEnabled="true" wmiEnabled="true" />
</configuration>

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.
Show:
© 2014 Microsoft