Click or drag to resize
LogManagerGetCurrentClassLogger Method (Type)
Gets a custom logger with the name of the current class. 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 GetCurrentClassLogger(
	Type loggerType
)

Parameters

loggerType
Type: SystemType
The logger class. The class must inherit from Logger.

Return Value

Type: Logger
The logger of type loggerType.
Remarks
This is a slow-running method. Make sure you're not doing this in a loop.
See Also