Click or drag to resize
LogFactoryGetCurrentClassLogger 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 Logger GetCurrentClassLogger(
	Type loggerType
)

Parameters

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

Return Value

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