Method GetCurrentClassLogger
- Namespace
- WhalesSecret.TradeScriptLib.Logging
- Assembly
- WhalesSecret.TradeScriptLib.dll
GetCurrentClassLogger(string?, string?, bool, int)
Convenience method to preserve the same contract as NLog provides.
public static WsLogger GetCurrentClassLogger(string? name = null, string? uid = null, bool useNameAsCallerClassName = true, int skipFrames = 1)
Parameters
name
stringName of the logger, or
null
to use reflection to compute the class name where this method is called.uid
stringUser specific identifier of the logger instance, or
null
to have no user specific identifier.useNameAsCallerClassName
booltrue
to use thename
as the caller class name,false
to compute it every time from stack frames using reflection.skipFrames
intOnly relevant if
name
isnull
. In such case, the value denotes how many stack frames to skip to compute the logger name.
Returns
- WsLogger
New Whales Secret logger instance.
Remarks
Passing an explicit name to name
is AOT friendly.