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 topic).
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 the following table.
Serviceability Message Severities
Name | Specifier | Meaning |
FATAL | svc_c_sev_fatal | A fatal error has occurred; the program is about to exit. |
ERROR | svc_c_sev_error | An error has occurred. |
WARNING | svc_c_sec_warning | An error has been detected; the program is continuing execution. |
NOTICE | svc_c_sev_notice | A nonerror event has occurred; this message is an informational notice of it. |
NOTICE_VERBOSE | svc_c_sev_notice_verbose | A nonerror event has occurred; this message is a verbose informational notice of it. |
FATAL
Fatal error exit: An unrecoverable error (such as database corruption) has occurred which will probably require manual intervention to be corrected. The program usually
terminates immediately after such an error.
ERROR
Error detected: An unexpected event that is nonterminal (such as a timeout), or is correctable by human intervention, has occurred. The program will continue operation,
although some functions or services may no longer be available. This severity level may also be used to indicate that a particular request or action could not be completed.
WARNING
Correctable error: An error occurred that was automatically corrected (for example, a configuration file was not found, and default values were used instead). This
severity level may also be used to indicate a condition that may be an error if the effects are undesirable (for example, removing all files as a side effect of removing a nonempty
directory), or to indicate a condition which, if not corrected, will eventually result in an error (for example, a printer's running low on paper).
NOTICE
Informational notice: A significant routine major event has occurred; for example, a server has started.
NOTICE_VERBOSE
Verbose information notice: A significant routine event has occurred; for example, a directory entry was removed.
Note that debug messages are identified as such by their own set of levels; see Using Serviceability for Debug Messages for more information.