Common Logging 2.0 API Reference

ConfigurationSectionHandler Class

Used in an application's configuration file (App.Config or Web.Config) to configure the logging subsystem.

For a list of all members of this type, see ConfigurationSectionHandler Members .

System.Object
   ConfigurationSectionHandler

[Visual Basic]
Public Class ConfigurationSectionHandler
    Implements IConfigurationSectionHandler
[C#]
public class ConfigurationSectionHandler : IConfigurationSectionHandler

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

An example configuration section that writes log messages to the Console using the built-in Console Logger.

[XML]
<configuration>
    <configSections>
      <sectionGroup name="common">
        <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
      </sectionGroup> 
    </configSections>
    <common>
      <logging>
        <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
          <arg key="showLogName" value="true" />
          <arg key="showDataTime" value="true" />
          <arg key="level" value="ALL" />
          <arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" />
        </factoryAdapter>
      </logging>
    </common>
</configuration>

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

ConfigurationSectionHandler Members | Common.Logging Namespace