OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
1994-04-06-20:06:33.113+00:00I----- hello NOTICE hel main hello_svc.c line_nr 0xa444e208
This message has exactly 2 not 7 argument(s)
4.3.2 Extended Format Notation for Message Text
A slightly extended notation allows you to define message texts in the sams file that will
(if desired) have format specifiers in their application code forms (that is, in the .c and
.msg files output by sams), but which will be replaced by some specified string constant
in the message texts that are generated for documentation use (that is, in the .sml and
.man files).
The notation consists in surrounding the format specifier and alternative constant with <
and > (angle bracket) characters, and separating the two with a | (vertical bar). (You can
use a preceding \ (backslash) to escape these symbols.) For example, the following
message text field:
text Can’t open input file %s for reading
would become something like the following:
text Can’t open input file <%s|filename> for reading
This message text definition, when processed by sams, would generate a format string
with %s in the .c and message files, but this format specifier would be replaced by the
string filename in the .sml and .man file versions.
4.3.3 Specifying Message Severity
Production (that is, nondebug) serviceability messages are categorized by their severity
level, which implies various important things about the kind of situation that causes the
message to be printed. Every message’s severity is stated in the text of the message itself
(for example, NOTICE in the examples given previously shows that the messages are
‘‘informational notices’’), and the serviceability routines can route and process messages
differently on the basis of their severity levels.
Severity levels are attached to messages either when the messages are defined (in the
sams file) or when the messages are written (by specifying an argument to the routine
writing the message). These severity levels can then be used at runtime as the basis on
which to route the messages (the way this is done will be explained in the next section).
Thus, each severity level is represented by a constant by which it is specified in program
code, and a name by which it is referred to in routing files and environment variables.
Each level’s name and constant is shown, together with an explanation, in Table 4-1.
4 20 Tandem Computers Incorporated 124245