1ADDSEVERITY(3) Linux Programmer's Manual ADDSEVERITY(3)
2
3
4
6 addseverity - introduce new severity classes
7
9 #include <fmtmsg.h>
10
11 int addseverity(int severity, const char *s);
12
13 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15 addseverity(): _SVID_SOURCE
16
18 This function allows the introduction of new severity classes which can
19 be addressed by the severity argument of the fmtmsg(3) function. By
20 default that latter function only knows how to print messages for
21 severity 0-4 (with strings (none), HALT, ERROR, WARNING, INFO). This
22 call attaches the given string s to the given value severity. If s is
23 NULL, the severity class with the numeric value severity is removed.
24 It is not possible to overwrite or remove one of the default severity
25 classes. The severity value must be non-negative.
26
28 Upon success, the value MM_OK is returned. Upon error, the return
29 value is MM_NOTOK. Possible errors include: out of memory, attempt to
30 remove a nonexistent or default severity class.
31
33 addseverity() is provided in glibc since version 2.1.
34
36 This function is not specified in the X/Open Portability Guide although
37 the fmtmsg(3) function is. It is available on System V systems.
38
40 New severity classes can also be added by setting the environment vari‐
41 able SEV_LEVEL.
42
44 fmtmsg(3)
45
47 This page is part of release 3.22 of the Linux man-pages project. A
48 description of the project, and information about reporting bugs, can
49 be found at http://www.kernel.org/doc/man-pages/.
50
51
52
53GNU 2008-06-14 ADDSEVERITY(3)