Returns a tracer's current threshold trace level.
call "CBL_CTF_TRACER_LEVEL_GET" using by value flags by reference component-id by reference trace-level returning status-code
Using call prototype (see Library Routines - Key) | Picture (32-bit systems) | |
---|---|---|
flags | cblt-x4-comp5 | pic x(4) comp-5 |
component-id | pic x(n) | pic x(n) |
trace-level | cblt-x4-comp5 | pic x(4) comp-5 |
status-code | See Library Routines - Key |
flags | Control flags:
| ||||||||||||||||||
component-id | Component identifier. This is either a pic x(4) comp-5 tracer handle (from
CBL_CTF_TRACER_GET) if bit 31 of flags is not set, or a pic x(n) text
identifier if bit 31 of flags is set.
The default trace level is returned if a NULL or empty string is specified. |
trace-level | Value indicating the tracer's threshold trace level:
| ||||||||||||||
status-code | One of:
|
You typically call this routine before performing any costly trace data formatting that CBL_CTF_TRACE might involve.
If you have used CBL_CTF_TRACER_NOTIFY to install a callback function to process any changes made to the tracer's configuration, you only need to call CBL_CTF_TRACER_LEVEL_GET during trace initialization and in the callback function when the threshold trace level changes.
When a component needs to check for the current threshold trace level it can check the variable into which CBL_CTF_TRACER_LEVEL_GET has previously returned the threshold value.
To acquire a tracer handle to trace "mycomp" component events, and then use CBL_CTF_TRACER_LEVEL_GET to determine whether the component is configured to trace information level events before performing the trace operation:
copy "cbltypes.cpy".
copy "mfctf.cpy".
78 78-EVENT-TYPE-A value 1.
01 component-name pic x(7) value "mycomp".
01 flags pic x(4) comp-5.
01 trace-event cblt-trc-event.
01 trace-level pic x(4) comp-5.
01 tracer-handle pic x(4) comp-5.
...
call "CBL_CTF_TRACER_GET" using by value 0
by reference component-name
by reference tracer-handle
...
call "CBL_CTF_TRACER_LEVEL_GET" using by value 0
by reference component-name
by reference trace-level
if 78-CTF-FLAG-LEVEL-INFO >= trace-level
set up trace-info
compute flags = 78-CTF-FLAG-LEVEL-INFO
call “CBL_CTF_TRACE” using by value flags
by reference tracer-handle
by reference trace-event
end-if
...