Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ DCE_SVC_LOG(3dce) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

DCE_SVC_LOG(3dce)  —  Subroutines

Name

DCE_SVC_LOG − Macro to output a binary form of a serviceability debug message

Synopsis

#include <dce/dce.h> DCE_SVC_LOG((
dce_svc_handle_t handle,
const unsigned32 table_index,
unsigned32 debug_level,
const unsigned32 messageid,
char ∗ format,
. . .));

Parameters

Input

handleThe caller’s serviceability handle. 

table_indexThe message’s subcomponent name (defined in the sams file). 

debug_levelServiceability debug level for the message. 

messageidA message ID, defined in the message’s code field in the sams file. 

formatA message format specifier string (used if messageid cannot be found). 

. . .Any format arguments for the message string. 

Description

The DCE_SVC_LOG macro is used to generate debugging output based on a message defined in an application’s sams file (in this respect it is unlike DCE_SVC_DEBUG, in which the message is specified as a literal string parameter).  Because it is a macro that takes a variable number of arguments, the entire parameter list must be enclosed in two sets of parentheses.  The handle and table_index parameters are as described for dce_svc_printf(). 

The message can be specified in either one of two ways: by messageid, identifying a message defined in the normal way in the application’s sams file; or as a string literal paramater (format).  The format string is used only if the specified messageid cannot be found. 

DCE_SVC_LOG generates a record in the serviceability binary format, not a conventional serviceability message as such.  The complete message text is not normally written; instead, only the message ID (the messageid specified in the macro parameter), and its format arguments (if any) are written.  When the binary log is read (see svcdumplog(8dce)), the text of the message is reconstructed from the application’s installed message catalog.  However, if the original message was generated from the format argument, then the entire message text is written to the binary record. 

The debug_level argument indicates the level of detail associated with the message and must be in the range svc_c_debug1 to svc_c_debug9. 

Thus the value of debug_level associates the message with one of nine levels, and whether or not the message is actually generated at run time will depend on what debugging level has been set for the application.  The level can be set by the application itself by a call to dce_svc_debug_set_levels() or dce_svc_debug_routing().  The level can also be set by the value of an environment variable or a serviceability routing file.  See svcroute(5dce) for further information. 

The significance of the various levels is application-defined, but in general the higher levels (numbers) imply more detail in debugging output. 

Related Information

Functions:  DCE_SVC_DEBUG(3dce), DCE_SVC_DEBUG_ATLEAST(3dce), DCE_SVC_DEBUG_IS(3dce). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026