...
Operates
Code Block | ||||
---|---|---|---|---|
| ||||
EdmiError edmiTrace(SdaiInteger traceFunction,
SdaiInteger traceCondition,
SdaiInteger maxTraceFileSize,
SdaiString traceFile);
|
Operates the EDMinterface trace facilities. The EDMinterface trace facilities is a powerful trace mechanism to assist EDMinterface users in testing and bug hunting of their EDMinterface application.
...
Several filters for tracing can be defined. The resulting trace output is in plain ASCII that can be easily read and understood.
...
Running with the EDMinterface trace active will normally decrease the performance of EDMinterface operations considerably.
Arguments
...
Type | Name | Comment |
SdaiInteger | traceFunction | Specifies the actual EDMinterface trace operation to perform. The available operations are:
|
SdaiInteger | traceCondition | The <traceCondition> argument is only effective when the <traceFunction> = DEFINE_TRACE. This argument can be any combination (bitwise OR) of the following.
|
SdaiInteger | maxTraceFileSize | An integer specifying the maximum number of bytes in the <traceFile> before the file is closed or the file is rewound. This argument is only valid when <traceCondition> = DEFINE_TRACE and TRACE_TO_FILE is set in <traceCondition>. When TRACE_RINGFILE is set in <traceCondition>, then the <traceFile> will be rewound when the file size is equal to <maxTraceFileSize>number of bytes, else the file will be closed and trace output will terminate. When <maxTraceFileSize>= 0, then no check for maximum file size will be performed. |
SdaiString | traceFile | Name of a file to write the EDMinterface trace records into. This argument is only valid for <traceFunction>=DEFINE_TRACE. |
...
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
Example
...
Code Block | ||
---|---|---|
| ||
EdmiError rstat; ... if (rstat = edmiTrace(DEFINE_TRACE, |
...
TRACE_CALLS | TRACE_ARGS | TRACE_RETURNS |
...
| TRACE_ERRORS | TRACE_TO_FILE, |
...
0, |
...
"/usr/users/hkd/edmi_trace.txt")) { |
...
/* Error in operation */ |
...
printf("\nError in edmiTrace(DEFINE_TRACE): %s", |
...
edmiGetErrorText(rstat)); |
...
goto error; |
...
} if (rstat = edmiTrace(START_TRACE,0,0,NULL)) { |
...
/* Error in operation */ |
...
printf("\nError in edmiTrace(START_TRACE): %s", |
...
edmiGetErrorText(rstat)); |
...
goto error; |
...
} ... |
...
if (rstat = edmiTrace(CLOSE_TRACE,0,0,NULL)) { |
...
/* Error in operation */ |
...
printf("\nError in edmiTrace(CLOSE_TRACE): %s", |
...
edmiGetErrorText(rstat)); |
...
goto error; |
...
}
... |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|