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

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

Parameters

name
Type: SystemString
Name of the logger.
loggerType
Type: SystemType
The logger class. The class 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.
Remarks
The generic way for this method is GetLogger(String)
See Also