Click or drag to resize
LogFactoryGetLogger Method (String, Type)
Gets the specified named logger. Use loggerType to pass the type of the needed Logger.

Namespace: NLog
Assembly: NLog (in NLog.dll) Version: 4.3.0
public Logger GetLogger(
	string name,
	Type loggerType


Type: SystemString
Name of the logger.
Type: SystemType
The type of the logger to create. The type must inherit from Logger.

Return Value

Type: Logger
The logger of type loggerType. Multiple calls to GetLogger with the same argument aren't guaranteed to return the same logger reference.
See Also