Turn on tracing
The mi_tracelevel_set() function sets the current trace level for one or more trace classes.
You can use this function to perform the following tasks:
- Turn tracing for specified trace classes on or off.
By default, tracing for a particular trace class is off; that is, the current trace level of trace class is set to zero (0) for all trace classes. Any nonzero value for a trace level turns tracing on for the specified trace class.
- Change the current trace level for a trace class.
You can reset the trace level as often as necessary during testing. After it is set, tracing persists throughout the session.
You pass to the mi_tracelevel_set() function
a series of set commands, one set command for each trace class that
you want set. A set command has the following format:
traceclass_name trace_level
The following example sets the trace class funcEntry (which Figure 1 defines)
to a medium level (trace level of 14) and enables
consistency checking with a trace class named chk_consist:
mi_integer ret;
...
ret = mi_tracelevel_set("chk_consist 1000 funcEntry 14");
You can also change the current trace level of a trace class with
the mi_tracelevel_set() function. The following
example changes the trace level of the funcEntry trace class
from 14 (from the previous example) to a lower level
of 5:
ret = mi_tracelevel_set("funcEntry 5");