|
|
#include <pfmt.h>int addsev(int int_val, const char *string);
addsev( ) associates an integer value int_val in the range 5 to 255 inclusive with a character string, string. It overwrites any previous association between int_val and string.
If int_val is ORed with the flags passed to subsequent calls to pfmt( ), string is used as the severity.
Passing a null string removes the severity.
Only the standard severities are automatically displayed for the locale in effect at run time. An application must provide the means for displaying locale-specific versions of add-on severities.
#define Panic 5
setlabel("APPL");
setcat("my_appl");
addsev(Panic, gettxt(":26", "PANIC"));
/* ... */