CompactRepositorySelector GetRepository Method (String) | Apache log4net™ SDK Documentation

Get the named ILoggerRepository

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

C#
VB
C++
F#
Copy

    public ILoggerRepository GetRepository(
    	string repositoryName
    )

    Public Function GetRepository (
    	repositoryName As String
    ) As ILoggerRepository

    public:
    virtual ILoggerRepository^ GetRepository(
    	String^ repositoryName
    ) sealed

    abstract GetRepository :
            repositoryName : string -> ILoggerRepository
    override GetRepository :
            repositoryName : string -> ILoggerRepository

#### Parameters

repositoryName
  Type: System
  String
  the name of the repository to lookup

#### Return Value

Type: ILoggerRepository
The named ILoggerRepository

#### Implements

IRepositorySelector
GetRepository(String)
Exceptions

Exception | Condition
--- | ---
ArgumentNullException | throw if repositoryName is null
LogException | throw if the repositoryName does not exist

Remarks

Get the named ILoggerRepository. The default repository is log4net-default-repository. Other repositories must be created using the [M:CreateRepository(string, Type)]. If the named repository does not exist an exception is thrown.

See Also

#### Reference

CompactRepositorySelector Class
GetRepository Overload
log4net.Core Namespace