OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
However, the serviceability routines will still, by default, attempt first to retrieve a
specified message from the message catalog, even if an in-memory table has been
initialized; only if the message catalog cannot be found will the in-memory table be
used.
You can change the default behavior of the serviceability routines by setting the
SVC_NOXPGCAT environment variable to 1 (or any nonzero value). This will force
the routines to always go to the in-memory table for the specified message; they will
never look for the message catalog.
4.3.11 Dynamically Filtering Messages Before Output
The serviceability interface provides for a ‘‘hook’’ into the message-output mechanism
that allows applications to decide at the time of messaging whether the given message
should be output or not. The application defines its own routine to perform whatever
checking is desired, and installs the routine with a call to dce_svc_define_filter().
In addition, an application that installs such a message-filtering routine can also define
and install a routine that can be called remotely to alter the operation of the filter routine.
The remote-control routine is installed by the same call to dce_svc_define_filter( ).
The two routines must have the following signatures. The yes/no routine you define and
install is as follows:
boolean your_filter_routine(
dce_svc_prolog_t prolog,
va_list args)
The filter remote-control call is as follows:
void your_filter_remote_control(
idl_long_int arg_size;
idl_byte *arg ;
error_status_t *status)
Once installed, the filter routine will be automatically invoked every time a serviceability
routine is called to output a message. The filter receives a prolog argument that contains
all the pertinent information about the message. If the filter returns TRUE, the message
is output per the original serviceability call. If the filter returns FALSE, the message is
not output. The information in the prolog allows such decisions to be made on the basis
of severity level, subcomponent, message index, and so on. Its fields are as follows:
dce_svc_handle_t handle Serviceability handle of the application writing the
message.
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
4− 30 Tandem Computers Incorporated 124245