The Session_Trace request is a ToolTalk request that ttsession registers to handle itself; that is, ttsession is the handler for the Session_Trace request. This request can be sent by any ToolTalk client, and, although not recommended, other ToolTalk clients can register to handle this request. (Note: This method will cause tracing to not work.) The syntax for this request is:
[file] Session_Trace( in boolean on, in boolean follow [in attribute toPrint |in state toTrace |in op toTrace |in handler_ptype toTrace |in sender_ptype toTrace][...] );
The Session_Trace request turns message tracing in the scoped-to session on or off.
If tracing is on and the file attribute of the request is set, subsequent trace output is appended to the file named by the attribute.
If tracing is on and the file attribute is not set, tracing continues to the current trace.
By default, daemon mode causes the output to go to the console of the host on which ttsession is running; job-control mode causes the output to go to ttsession's standard error. Table 4-1 describes the required and optional arguments for this request.
Table 4-1 Session_Trace Agurments
The current session tracing behavior changes only if this request is not failed. On failure, the tt_message_status of the reply is set to one of the errors described in Table 4-2 .
Table 4-2 Error Messages Returned by Session_Trace Request
Error |
Description |
---|---|
No handler could be found for the request. |
|
ttsession does not have permission to open or create the trace file. |
|
The trace file is a directory. |
|
There is not enough space in the target file system to create the trace file. |
|
Tracing is already occurring on another file. ttsession resets the file attribute of the reply to name the existing trace file. To trace to a different file, first turn off tracing to the current trace file. |