log4net SDK Reference |

# CompactRepositorySelector.GetRepository Method (String)

Get the named ILoggerRepository

[Visual Basic]
NotOverridable Overloads Public Function GetRepository( _
ByVal repositoryName As String _
) As ILoggerRepository _
Implements IRepositorySelector.GetRepository
[C#]
public ILoggerRepository GetRepository(
string repositoryName
);

#### Parameters

repositoryName
  the name of the repository to lookup

#### Return Value

The named ILoggerRepository

#### Implements

IRepositorySelector.GetRepository

#### Remarks

Get the named ILoggerRepository. The default repository is `log4net-default-repository`. Other repositories must be created using the CreateRepository. If the named repository does not exist an exception is thrown.

#### Exceptions

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

#### See Also

CompactRepositorySelector Class | log4net.Core Namespace | CompactRepositorySelector.GetRepository Overload List