Generating trace records

In the service implementation functions, the local and global tracemasks are checked to see what trace record categories are active. For active trace record categories, invoke dispLogTrace with the following arguments to generate and log a trace record:

To determine whether or not to invoke dispLogTrace, check both the global and local tracemasks to see if the appropriate category is set. If so, invoke dispLogTrace.

tik service

One of the things being traced is the set of commands being sent from the tik service to the tik server (when the tracemask has the CTA_TRACEMASK_DRIVER_COMMANDS category set).

<<<< excerpt from tikcomms.c >>>>

/*--------------------------------------------------------------
  Utility function to send a command via IPC synchronously.
  A Natural Access error code is returned to indicate success
  status.
  -------------------------------------------------------------*/
DWORD tikSendClientCommand( TIK_CHANNEL_OBJECT *ptikChannel,
                            TIK_CMD_COM_OBJ    *cmd )
{
   int                     cnt;
   DWORD                   ret;
   TSIIPC_COMMAND_STATUS   status = {0};

   if ( cmd == NULL || ptikChannel == NULL )
   {
      return CTAERR_BAD_ARGUMENT;
   }

   /* Log trace if requested. Both the global tracemask must be
      checked as well as the local, per mgrcontext, tracemask.*/
   if ( *tikTracePointer & CTA_TRACEMASK_DRIVER_COMMANDS ||
        ptikChannel->tracemask & CTA_TRACEMASK_DRIVER_COMMANDS )
   {
      if( (ret=dispLogTrace( ptikChannel->ctahd,
                          TIK_SVCID,
                          CTA_TRACE_SEVERITY_INFO,
                          TIK_TRACETAG_CMD,
                          (void *)cmd,
                          sizeof(TIK_CMD_COM_OBJ) )) != SUCCESS )
      {
         return ret;
      }
   }
   ...
}