1syslog.h(0P) POSIX Programmer's Manual syslog.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 syslog.h — definitions for system error logging
14
16 #include <syslog.h>
17
19 The <syslog.h> header shall define the following symbolic constants,
20 zero or more of which may be OR'ed together to form the logopt option
21 of openlog():
22
23 LOG_PID Log the process ID with each message.
24
25 LOG_CONS Log to the system console on error.
26
27 LOG_NDELAY Connect to syslog daemon immediately.
28
29 LOG_ODELAY Delay open until syslog() is called.
30
31 LOG_NOWAIT Do not wait for child processes.
32
33 The <syslog.h> header shall define the following symbolic constants for
34 use as the facility argument to openlog():
35
36 LOG_KERN Reserved for message generated by the system.
37
38 LOG_USER Message generated by a process.
39
40 LOG_MAIL Reserved for message generated by mail system.
41
42 LOG_NEWS Reserved for message generated by news system.
43
44 LOG_UUCP Reserved for message generated by UUCP system.
45
46 LOG_DAEMON Reserved for message generated by system daemon.
47
48 LOG_AUTH Reserved for message generated by authorization daemon.
49
50 LOG_CRON Reserved for message generated by clock daemon.
51
52 LOG_LPR Reserved for message generated by printer system.
53
54 LOG_LOCAL0 Reserved for local use.
55
56 LOG_LOCAL1 Reserved for local use.
57
58 LOG_LOCAL2 Reserved for local use.
59
60 LOG_LOCAL3 Reserved for local use.
61
62 LOG_LOCAL4 Reserved for local use.
63
64 LOG_LOCAL5 Reserved for local use.
65
66 LOG_LOCAL6 Reserved for local use.
67
68 LOG_LOCAL7 Reserved for local use.
69
70 The <syslog.h> header shall define the following macros for construct‐
71 ing the maskpri argument to setlogmask(). The following macros expand
72 to an expression of type int when the argument pri is an expression of
73 type int:
74
75 LOG_MASK(pri) A mask for priority pri.
76
77 The <syslog.h> header shall define the following symbolic constants for
78 use as the priority argument of syslog():
79
80 LOG_EMERG A panic condition was reported to all processes.
81
82 LOG_ALERT A condition that should be corrected immediately.
83
84 LOG_CRIT A critical condition.
85
86 LOG_ERR An error message.
87
88 LOG_WARNING A warning message.
89
90 LOG_NOTICE A condition requiring special handling.
91
92 LOG_INFO A general information message.
93
94 LOG_DEBUG A message useful for debugging programs.
95
96 The following shall be declared as functions and may also be defined as
97 macros. Function prototypes shall be provided.
98
99 void closelog(void);
100 void openlog(const char *, int, int);
101 int setlogmask(int);
102 void syslog(int, const char *, ...);
103
104 The following sections are informative.
105
107 None.
108
110 None.
111
113 None.
114
116 The System Interfaces volume of POSIX.1‐2008, closelog()
117
119 Portions of this text are reprinted and reproduced in electronic form
120 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
121 -- Portable Operating System Interface (POSIX), The Open Group Base
122 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
123 cal and Electronics Engineers, Inc and The Open Group. (This is
124 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
125 event of any discrepancy between this version and the original IEEE and
126 The Open Group Standard, the original IEEE and The Open Group Standard
127 is the referee document. The original Standard can be obtained online
128 at http://www.unix.org/online.html .
129
130 Any typographical or formatting errors that appear in this page are
131 most likely to have been introduced during the conversion of the source
132 files to man page format. To report such errors, see https://www.ker‐
133 nel.org/doc/man-pages/reporting_bugs.html .
134
135
136
137IEEE/The Open Group 2013 syslog.h(0P)