The mi_tracelevel_set() function
The mi_tracelevel_set() function sets the trace level for specified trace classes.
Syntax
mi_integer mi_tracelevel_set(set_commands)
const mi_string *set_commands;
- set_commands
- A list of value pairs that specify trace class names and integer trace levels. A space separates each class-name and trace-level pair from the next pair.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
traceclass_name traceclass_level
50
and
the level for trace class outData to 35
:
mi_integer ret;
...
ret = mi_tracelevel_set("funcEntry 50 outData 35");
By default, tracing is off; that is, the current trace level is set to zero for all trace classes. Any nonzero value for a trace level turns tracing on for the specified trace class. A trace level can be any integer from zero to the maximum long integer value for the development platform.
50
, the following tracepoint
would execute because the value (10
) in the argument
to DPRINTF is not greater than the current level (50
)
of funcEntry:DPRINTF("funcEntry", 10,
("Entering compute_output with inStr = %s", inStr));
The trace message from this DPRINTF call would be written to the current trace-output file. For information about how to set the trace-output file, see the description of the mi_tracefile_set() function.
Return values
- MI_OK
- The function was successful.
- MI_ERROR
- The function was not successful.