OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
unsigned_char_t *debug_routes = \
"hel:*.4:TEXTFILE:/tmp/hel_debug_log_%ld;STDERR:-";
A debug level of svc_c_debug4 is specified, and all debug messages of that level or
lower will be written both to standard error and in text form to the following file:
/tmp/hel_debug_log_process_ID
where process_ID is the process ID of the program writing the messages.
The specification string could be passed to dce_svc_debug_routing( ) as follows:
dce_svc_debug_routing(debug_routes, &status);
To specify the same routing by environment variable, the string following value should
be assigned to SVC_CMP_DBG:
hel:*.4:TEXTFILE:/tmp/hel_debug_log_%ld;STDERR:-
The same string information could also be inserted into the SVC_CMP environment
variable or into the contents of the routing file.
Debug routing by attribute (as specified in the sams file) is done in the same way as
routing for normal messages. See Section 4.3.4.4.
4.3.13 Performance Costs of Serviceability Debugging
If serviceability debugging routines are used in an application, one of three different
things can happen to any given debugging routine at runtime:
The routine is called, and its output is generated (because the debug level associated
with the message has been enabled).
The routine is called, but its output is not generated (because the debug level
associated with the message has been disabled).
The routine call is not present in the application code because serviceability
debugging has been compiled out (DCE_DEBUG was not defined when the
application was compiled).
Note that, even if a certain debug level has been disabled, any routine or macro call to
output a message with that level will still be executed unless other steps are taken to
prevent this. The performance cost associated with such ‘‘smothered’’ calls will usually
be insignificant, but situations can occur in which this will not be so.
4 38 Tandem Computers Incorporated 124245