Table of Contents

Method GetLogger

Namespace
WhalesSecret.TradeScriptLib.API
Assembly
WhalesSecret.TradeScriptLib.dll

GetLogger(LogLevel, string?, string?)

Creates a new logger with an optional identifier.

ILogger GetLogger(LogLevel logLevel, string? id = null, string? layout = null)

Parameters

logLevel LogLevel

Default logging level for the newly created logger.

id string

Optionally, identifier of the logger that can be inserted into every logged message via LayoutId placeholder.

layout string

Optionally, layout format of log lines. If null is provided, the default layout will be used.

The layout string should not contain $ characters, they are replaced by single space characters.

The layout may contain any of the following placeholders:

See DefaultLayout for an example of a layout string.

Returns

ILogger

Newly created trade script logger.

Exceptions

InvalidArgumentException

Thrown if id or layout is too long.