TRACEn

The TRACEn macro is used to specify data to be traced; this data can include variable parameters. The format of the TRACEn call is one of the following, depending on whether parameters are included:

TRACEn()"string in sprintf format"));
TRACEn()"string in sprintf format containing parameters", parameters));

Note that the unmatched parentheses are deliberate; they are resolved by the expansion of the macro.

The value n identifies the severity level of the trace. It can take the values 2, 4, 6, 8, 10, 12, or 16, where levels 6 to 16 correspond to the audit and error log levels (see Error and Audit Log Messages), and 2 and 4 are used for very low-level detail tracing. This allows run-time filtering of trace information so that only information above a specified level is logged; see the following topic for more information.

The following examples illustrate the use of the tracing macros:

COM_ENTRY("proc1");
TRACE4()"Start of error-handling routine"));
TRACE8()"Supplied parameters are %s, %d", parm1, parm2));