Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

XmlConfigurator.Configure�Method�(ILoggerRepository)

Automatically configures the ILoggerRepository using settings stored in the application's configuration file.

[Visual�Basic]
Overloads�Public�Shared�Function�Configure( _
���ByVal repository�As�ILoggerRepository�_
)�As�ICollection
[C#]
public�static�ICollection�Configure(
���ILoggerRepositoryrepository
);

Parameters

repository
The repository to configure.

Remarks

Each application has a configuration file. This has the same name as the application with '.config' appended. This file is XML and calling this function prompts the configurator to look in that file for a section called log4net that contains the configuration data.

To use this method to configure log4net you must specify the Log4NetConfigurationSectionHandler section handler for the log4net configuration section. See the Log4NetConfigurationSectionHandler for an example.

See Also

XmlConfigurator Class | log4net.Config Namespace | XmlConfigurator.Configure Overload List