XmlConfiguratorAttribute Configure Method | Apache log4net™ SDK Documentation

Configures the ILoggerRepository for the specified assembly.

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

C#
VB
C++
F#
Copy

    public override void Configure(
    	Assembly sourceAssembly,
    	ILoggerRepository targetRepository
    )

    Public Overrides Sub Configure (
    	sourceAssembly As Assembly,
    	targetRepository As ILoggerRepository
    )

    public:
    virtual void Configure(
    	Assembly^ sourceAssembly,
    	ILoggerRepository^ targetRepository
    ) override

    abstract Configure :
            sourceAssembly : Assembly *
            targetRepository : ILoggerRepository -> unit
    override Configure :
            sourceAssembly : Assembly *
            targetRepository : ILoggerRepository -> unit

#### Parameters

sourceAssembly
  Type: System.Reflection
  Assembly
  The assembly that this attribute was defined on.
targetRepository
  Type: log4net.Repository
  ILoggerRepository
  The repository to configure.

Exceptions

Exception | Condition
--- | ---
ArgumentOutOfRangeException | The targetRepository does not extend Hierarchy.

Remarks

Configure the repository using the XmlConfigurator. The targetRepository specified must extend the Hierarchy class otherwise the XmlConfigurator will not be able to configure it.

See Also

#### Reference

XmlConfiguratorAttribute Class
log4net.Config Namespace