ITrace interface

Member of ININ.Addins Since 2016 R1 API Version 1

An object that writes trace messages into the hosting application's tracing system.

The trace messages are logged at levels in the following order (from low to high):

For example, traces logged with the warning method will be traced if the trace settings are at "Warning" level or higher. However if the trace setting is at "Error", the message will not be logged.

To help save disk space, use a format string with {} as the placeholders. Do not use string concatenation. When the messages are read, the message will be interpolated with the actual values.

// Bad example - please do not repeat this pattern
trace.warning("The value is " + 27);

// Good example
trace.warning("The value is {}", 27);

Methods

always(message[, ...args])

Since 2016 R1 API Version 1

Always traces the specified message, regardless of trace level settings.

Parameters

Name Type Description
message String

The message or message format string.

args Any Repeatable Optional

One or more formatting arguments to pass for message formatting. Each value will be converted to a String.

error(message[, ...args])

Since 2016 R1 API Version 1

Traces the specified message at the Error trace level.

Parameters

Name Type Description
message String

The message or message format string.

args Any Repeatable Optional

One or more formatting arguments to pass for message formatting. Each value will be converted to a String.

note(message[, ...args])

Since 2016 R1 API Version 1

Traces the specified message at the Note trace level.

Parameters

Name Type Description
message String

The message or message format string.

args Any Repeatable Optional

One or more formatting arguments to pass for message formatting. Each value will be converted to a String.

status(message[, ...args])

Since 2016 R1 API Version 1

Traces the specified message at the Status trace level.

Parameters

Name Type Description
message String

The message or message format string.

args Any Repeatable Optional

One or more formatting arguments to pass for message formatting. Each value will be converted to a String.

verbose(message[, ...args])

Since 2016 R1 API Version 1

Traces the specified message at the Verbose trace level.

Parameters

Name Type Description
message String

The message or message format string.

args Any Repeatable Optional

One or more formatting arguments to pass for message formatting. Each value will be converted to a String.

warning(message[, ...args])

Since 2016 R1 API Version 1

Traces the specified message at the Warning trace level.

Parameters

Name Type Description
message String

The message or message format string.

args Any Repeatable Optional

One or more formatting arguments to pass for message formatting. Each value will be converted to a String.