1ADDSEVERITY(3)             Linux Programmer's Manual            ADDSEVERITY(3)
2
3
4

NAME

6       addseverity - introduce new severity classes
7

SYNOPSIS

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():
16           Since glibc 2.19:
17               _DEFAULT_SOURCE
18           Glibc 2.19 and earlier:
19               _SVID_SOURCE
20

DESCRIPTION

22       This function allows the introduction of new severity classes which can
23       be addressed by the severity argument of the  fmtmsg(3)  function.   By
24       default,  that  function  knows only how to print messages for severity
25       0-4 (with strings (none),  HALT,  ERROR,  WARNING,  INFO).   This  call
26       attaches the given string s to the given value severity.  If s is NULL,
27       the severity class with the numeric value severity is removed.   It  is
28       not  possible  to  overwrite  or  remove  one  of  the default severity
29       classes.  The severity value must be nonnegative.
30

RETURN VALUE

32       Upon success, the value MM_OK is  returned.   Upon  error,  the  return
33       value  is MM_NOTOK.  Possible errors include: out of memory, attempt to
34       remove a nonexistent or default severity class.
35

VERSIONS

37       addseverity() is provided in glibc since version 2.1.
38

ATTRIBUTES

40       For  an  explanation  of  the  terms  used   in   this   section,   see
41       attributes(7).
42
43       ┌──────────────┬───────────────┬─────────┐
44Interface     Attribute     Value   
45       ├──────────────┼───────────────┼─────────┤
46addseverity() │ Thread safety │ MT-Safe │
47       └──────────────┴───────────────┴─────────┘

CONFORMING TO

49       This function is not specified in the X/Open Portability Guide although
50       the fmtmsg(3) function is.  It is available on System V systems.
51

NOTES

53       New severity classes can also be added by setting the environment vari‐
54       able SEV_LEVEL.
55

SEE ALSO

57       fmtmsg(3)
58

COLOPHON

60       This  page  is  part of release 4.15 of the Linux man-pages project.  A
61       description of the project, information about reporting bugs,  and  the
62       latest     version     of     this    page,    can    be    found    at
63       https://www.kernel.org/doc/man-pages/.
64
65
66
67GNU                               2016-03-15                    ADDSEVERITY(3)
Impressum