Diagnostics.Trace

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

写入跟踪 message (如果已启用跟踪的话)并返回 value。可选参数 delayed 指定了是否延迟计算 value 直到跟踪到消息。traceLevel 可取以下任一值: TraceLevel.Critical TraceLevel.ErrorTraceLevel.WarningTraceLevel.InformationTraceLevel.Verbose

示例:

在调用 Text.From 函数前跟踪消息,并返回结果。

使用情况:

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

输出:

"123"

results matching ""

    No results matching ""