 | 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: NLogAssembly: NLog (in NLog.dll) Version: 4.3.0
Syntaxpublic Logger GetCurrentClassLogger(
Type loggerType
)
Public Function GetCurrentClassLogger (
loggerType As Type
) As Logger
Parameters
- loggerType
- Type: SystemType
The type of the logger to create. The type must inherit from Logger
Return Value
Type:
LoggerThe logger of type
loggerType.
RemarksThis is a slow-running method. Make sure you are not calling this method in a
loop.
See Also