LogManager CreateDomain Method (String) | Apache log4net™ SDK Documentation

Note: This API is now obsolete.

Creates a repository with the specified name.

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

C#
VB
C++
F#
Copy

    [ObsoleteAttribute("Use CreateRepository instead of CreateDomain")]
    public static ILoggerRepository CreateDomain(
    	string repository
    )

    <ObsoleteAttribute("Use CreateRepository instead of CreateDomain")>
    Public Shared Function CreateDomain (
    	repository As String
    ) As ILoggerRepository

    public:
    [ObsoleteAttribute(L"Use CreateRepository instead of CreateDomain")]
    static ILoggerRepository^ CreateDomain(
    	String^ repository
    )

    [<ObsoleteAttribute("Use CreateRepository instead of CreateDomain")>]
    static member CreateDomain :
            repository : string -> ILoggerRepository

#### Parameters

repository
  Type: System
  String
  The name of the repository, this must be unique amongst repositories.

#### Return Value

Type: ILoggerRepository
The ILoggerRepository created for the repository.
Exceptions

Exception | Condition
--- | ---
LogException | The specified repository already exists.

Remarks

CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.

Creates the default type of ILoggerRepository which is a Hierarchy object.

The repository name must be unique. Repositories cannot be redefined. An Exception will be thrown if the repository already exists.

See Also

#### Reference

LogManager Class
CreateDomain Overload
log4net Namespace