The serviceability interface includes a set of functions for reading and manipulating log files written as BINFILEs (see Using a Routing File).
dce_svc_log_open( )
Opens a log file for reading.
dce_svc_log_get( )
Reads the next entry from a log file. It returns the contents thereof in the form of a filled-in prolog structure to which it returns a pointer (see
below for a description of the structure fields).
dce_svc_log_rewind( )
Returns log processing back to the first message in the log file.
dce_svc_log_close( )
Closes the open log file.
The contents of the log prolog structure (defined in dce/svclog.h) are as follows:
int version
Version number of the interface that generated the message.
utc_t t
Pointer to an opaque binary timestamp containing the time at which the message was written. The opaque timestamp can be converted to a tm structure by
calling one of the DCE DTS utc_xxx( ) routines.
unsigned32 attributes
Message attributes, ORed together (a bit flag).
unsigned32 message_index
Index number of message in message table (for example, hel_s_hello in the example in Defining the Message).
pthread_t thread_id
ID of application thread that caused the message to be written.
char *argtypes
The format-specifier string for the message.
int argtypes_size
The number of format specifiers for the message.
char *fac_name
The component or subcomponent ("facility") name string.
char *message_text
Message text string.
char *progname
Program name string, set by the application's call to dce_svc_set_progname( ).
char *file
Filename string identifying file from which entry was read.
int line
Line number in file from where the message was printed.
int file_size
Length of filename string.