Log4NetConfigurationSectionHandler Class | Apache log4net™ SDK Documentation

Class to register for the log4net section of the configuration file
Inheritance Hierarchy

System
Object
log4net.Config
Log4NetConfigurationSectionHandler

Namespace: log4net.Config
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public class Log4NetConfigurationSectionHandler : IConfigurationSectionHandler

    Public Class Log4NetConfigurationSectionHandler
    	Implements IConfigurationSectionHandler

    public ref class Log4NetConfigurationSectionHandler : IConfigurationSectionHandler

    type Log4NetConfigurationSectionHandler =
        class
            interface IConfigurationSectionHandler
        end

The Log4NetConfigurationSectionHandler type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| Log4NetConfigurationSectionHandler | Initializes a new instance of the Log4NetConfigurationSectionHandler class.

Top
Methods

| Name | Description
--- | --- | ---
| Create | Parses the configuration section.
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
| ToString | Returns a String that represents the current Object. (Inherited from Object.)

Top
Remarks

The log4net section of the configuration file needs to have a section handler registered. This is the section handler used. It simply returns the XML element that is the root of the section.
Examples

Example of registering the log4net section handler :
Copy

    <configuration><configSections><section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /></configSections><log4net>
                    log4net configuration XML goes here
                  </log4net></configuration>

See Also

#### Reference

log4net.Config Namespace