Table of contents
TOC
Collapse the table of content
Expand the table of content

Diagnostics.Trace

Owen Duncan|Last Updated: 4/19/2018
|
1 Contributor

Diagnostics.Trace(traceLevel as number, message as text, value as any, optional delayed as nullable logical) as any

About

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.CriticalTraceLevel.Error, TraceLevel.Warning, TraceLevel.Information, TraceLevel.Verbose.

Example 1

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

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

"123"

© 2018 Microsoft