log4net SDK Reference |

# LoggerManager.CreateDomain Method (String)

NOTE: This method is now obsolete.

Use CreateRepository instead of CreateDomain

Creates a repository with the specified name.

[Visual Basic]
Overloads Public Shared Function CreateDomain( _
ByVal repository As String _
) As ILoggerRepository
[C#]
public static ILoggerRepository CreateDomain(
string repository
);

#### Parameters

repository
  The name of the repository, this must be unique amongst repositories.

#### Return Value

The ILoggerRepository created for the repository.

#### 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.

#### Exceptions

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

#### See Also

LoggerManager Class | log4net.Core Namespace | LoggerManager.CreateDomain Overload List