OSF DCE Application Development Guide--Core Components
Using the DCE Serviceability Application Interface
_______________________________________________________________________
Name Attribute Meaning
_________________________________________________________
_________________________________________________________
BINFILE Write binary log entry.
_________________________________________________________
TEXTFILE Write human-readable text.
_________________________________________________________
FILE Equivalent to TEXTFILE.
_________________________________________________________
DISCARD svc_c_route_nolog Do not record.
_________________________________________________________
Write human-readable text
to standard output.
STDOUT
_________________________________________________________
Write human-readable text
to standard error.
STDERR svc_c_route_stderr
_________________________________________________________
Route messages in same
way as named level or
component.
GOESTO
_________________________________________________________
4.3.6 Logging and Log Reading
The serviceability interface includes a set of functions for reading and manipulating log
files written as BINFILEs (see Section 4.3.4.1).
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 at the
beginning of this chapter).
pthread_t thread_id ID of application thread that caused the message to
be written.
124245 Tandem Computers Incorporated 4− 27