HierarchyGetLogger Method (String, ILoggerFactory)Apache log4net™ SDK Documentation
Return a new logger instance named as the first parameter using factory.

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

public Logger GetLogger(
	string name,
	ILoggerFactory factory
)

Parameters

name
Type: SystemString
The name of the logger to retrieve
factory
Type: log4net.Repository.HierarchyILoggerFactory
The factory that will make the new logger instance

Return Value

Type: Logger
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

Reference