Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Latest commit

 

History

History
21 lines (19 loc) · 994 Bytes

Diagnostics.Trace.md

File metadata and controls

21 lines (19 loc) · 994 Bytes

Diagnostics.Trace

Writes a trace entry, if tracing is enabled, and returns the value.

function (traceLevel as number, message as text, optional value as nullable any, optional delayed as nullable any) as nullable any

Description

Writes a trace message, if tracing is enabled, and returns value. An optional parameter delayed specifies whether to delay the evaluation of value until the message is traced. traceLevel can take one of the following values: TraceLevel.Critical TraceLevel.Error, TraceLevel.Warning, TraceLevel.Information, TraceLevel.Verbose.

Category

Diagnostics

Examples

Trace the message before invoking Text.From function and return the result.

Diagnostics.Trace(TraceLevel.Information, "TextValueFromNumber", () => Text.From(123), true)

"123"