Table of Contents

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 string

Name of the logger, or null to use reflection to compute the class name where this method is called.

uid string

User specific identifier of the logger instance, or null to have no user specific identifier.

useNameAsCallerClassName bool

true to use the name as the caller class name, false to compute it every time from stack frames using reflection.

skipFrames int

Only relevant if name is null. 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.