log4net SDK Reference

LogManager.CreateRepository Method (String)

Creates a repository with the specified name.

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

Parameters

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

Return Value

The ILoggerRepository created for the repository.

Remarks

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.CreateRepository Overload List