Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

LoggerManager.GetLogger�Method�(String, String)

Retrieves or creates a named logger.

[Visual�Basic]
Overloads�Public�Shared�Function�GetLogger( _
���ByVal repository�As�String,�_
���ByVal name�As�String�_
)�As�ILogger
[C#]
public�static�ILogger�GetLogger(
���stringrepository,
���stringname
);

Parameters

repository
The repository to lookup in.
name
The name of the logger to retrieve.

Return Value

The logger with the name specified.

Remarks

Retrieves a logger named as the name parameter. If the named logger already exists, then the existing instance will be returned. Otherwise, a new instance is created.

By default, loggers do not have a set level but inherit it from the hierarchy. This is one of the central features of log4net.

See Also

LoggerManager Class | log4net.Core Namespace | LoggerManager.GetLogger Overload List