log4net SDK Reference

LogManager.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 TypeCondition
LogExceptionThe specified repository already exists.

See Also

LogManager Class | log4net Namespace | LogManager.CreateDomain Overload List