Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

Hierarchy.GetLogger�Method�(String, ILoggerFactory)

Return a new logger instance named as the first parameter using factory.

[Visual�Basic]
Overloads�Public�Function�GetLogger( _
���ByVal name�As�String,�_
���ByVal factory�As�ILoggerFactory�_
)�As�Logger
[C#]
public�Logger�GetLogger(
���stringname,
���ILoggerFactoryfactory
);

Parameters

name
The name of the logger to retrieve
factory
The factory that will make the new logger instance

Return Value

The logger object with the name specified

Remarks

If a logger of that name already exists, then it will be returned. Otherwise, a new logger will be instantiated by the factory parameter and linked with its existing ancestors as well as children.

See Also

Hierarchy Class | log4net.Repository.Hierarchy Namespace | Hierarchy.GetLogger Overload List