 | LogManagerGetCurrentClassLogger Method (Type) |
Note: This API is now obsolete.
Gets a custom logger with the full name of the current class, so namespace and class name.
Use
loggerType to create instance of a custom
Logger.
If you haven't defined your own
Logger class, then use the overload without the loggerType.
Namespace:
NLog
Assembly:
NLog (in NLog.dll) Version: 5.2.0+eed5f76d158dbcaef9326f7a0e1c281adad171e8
Syntax[ObsoleteAttribute("Replaced by LogFactory.GetCurrentClassLogger<T>(). Marked obsolete on NLog 5.2")]
public static Logger GetCurrentClassLogger(
Type loggerType
)
<ObsoleteAttribute("Replaced by LogFactory.GetCurrentClassLogger<T>(). Marked obsolete on NLog 5.2")>
Public Shared Function GetCurrentClassLogger (
loggerType As Type
) As Logger
Dim loggerType As Type
Dim returnValue As Logger
returnValue = LogManager.GetCurrentClassLogger(loggerType)
[<ObsoleteAttribute("Replaced by LogFactory.GetCurrentClassLogger<T>(). Marked obsolete on NLog 5.2")>]
static member GetCurrentClassLogger :
loggerType : Type -> Logger
Parameters
- loggerType
- Type: SystemType
The logger class. This class must inherit from Logger.
Return Value
Type:
LoggerThe logger of type
loggerType.
RemarksThis is a slow-running method.
Make sure you're not doing this in a loop.
See Also