Node:Adding Severity Classes, Next:Example, Previous:Printing Formatted Messages, Up:Formatted Messages
There is another possibility to introduce severity classes besides using
the environment variable SEV_LEVEL
. This simplifies the task of
introducing new classes in a running program. One could use the
setenv
or putenv
function to set the environment variable,
but this is toilsome.
int addseverity (int severity, const char *string) | Function |
This function allows the introduction of new severity classes which can be
addressed by the severity parameter of the fmtmsg function.
The severity parameter of addseverity must match the value
for the parameter with the same name of fmtmsg , and string
is the string printed in the actual messages instead of the numeric
value.
If string is It is not possible to overwrite or remove one of the default severity
classes. All calls to The return value is This function is not specified in the X/Open Portability Guide although
the |