skip to main content
General Support API : Trace Function : tm_trace
 

tm_trace

The tm_trace function provides a flexible way to trace events because you can set different levels of tracing with total control over enabling or disabling at runtime. Output of the trace can go to the display or a file, or to both.
tm_trace(
int handle,
int flag,
const char * format, (arg1, arg2...))
Table 234. Parameters for tm_trace
Parameter
Type
Description
IN
handle
int
The handle to the trace module that is passed in when OAIP_init is called.
flag
int
Flag indicating which trace level must be enabled for this trace message to be written to the trace file. See Table 235.
format
const char*
Specifies a message format using the printf formatting syntax.
RETURN
int
Function call status:
DAM_SUCCESS - values set
DAM_FAILURE - values not set. One of the values was null when it cannot be.
The flag is a mask defined by the combination of using one or more of the masks listed in the following table.
The resulting mask and the ServiceIpLogOptions setting determines the message specified in format is logged at runtime. The list (arg1, arg2...) contains a variable number of arguments that apply to format. The format parameter and arguments use the same conventions as (C/C++) printf,except that the argument list requires an additional pair of parentheses.
Table 235. Trace Flag Masks for use in tm_trace()
Flag Mask
ServiceIPLogOption1
Description
UL_TM_FATAL
Disable All Tracing
Indicates fatal errors, such as cannot get memory or invalid address. Use to enable trace messages that need to be written, no matter what the ServiceIPLogOption attribute is set to.
UL_TM_ERRORS
Enable Error Tracing
Indicates general errors such as invalid user name or password.
UL_TM_MAJOR_EV
Enable Major Events Tracing
Indicates a major application event such as processing schema request.
UL_TM_INFO
Enable Full Tracing
Indicates detailed logging of the IP's activities.
UL_TM_TRIVIA
Enable Verbose Tracing
Indicates very detailed messages. This setting could generate lots of output.

1 The selected logging level and all levels above it are enabled. For example, selecting Enable Major Events will turn on all trace messages that use the flag UL_TM_FATAL, UM_TM_ERRORS, or UL_TM_MAJOR_EV.