Creates a repository with the specified name and repository type.
Namespace: log4netAssembly: log4net (in log4net.dll) Version: 1.2.15.0 (1.2.15.0)
Syntax
Parameters
- repository
- Type: System String
The name of the repository, this must be unique to the repository.
- repositoryType
- Type: System Type
A Type that implements ILoggerRepository and has a no arg constructor. An instance of this type will be created to act as the ILoggerRepository for the repository specified.
Return Value
Type: ILoggerRepositoryThe ILoggerRepository created for the repository.
Exceptions
Exception | Condition |
---|---|
log4net.Core LogException | The specified repository already exists. |
Remarks
The repository name must be unique. Repositories cannot be redefined. An Exception will be thrown if the repository already exists.
See Also