OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / syslog.3
1 .\" Written  Feb 1994 by Steve Greenland (stevegr@neosoft.com)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Updated 1999.12.19 by Karl M. Hegbloom <karlheg@debian.org>
24 .\"
25 .\" Updated 13 Oct 2001, Michael Kerrisk <mtk.manpages@gmail.com>
26 .\"     Added description of vsyslog
27 .\"     Added descriptions of LOG_ODELAY and LOG_NOWAIT
28 .\"     Added brief description of facility and option arguments
29 .\"     Added CONFORMING TO section
30 .\" 2001-10-13, aeb, minor changes
31 .\" Modified 13 Dec 2001, Martin Schulze <joey@infodrom.org>
32 .\" Modified 3 Jan 2002, Michael Kerrisk <mtk.manpages@gmail.com>
33 .\"
34 .\" Japanese Verion Copyright (c) 1996 Shoichi OZAWA
35 .\"     all right reserved.
36 .\" Translated Sep 1 20:14:01 JST 1996
37 .\"     by Shoichi OZAWA <ozawa@omika.hitachi.co.jp>
38 .\" Updated Thu Oct 18 01:00:02 JST 2001
39 .\"     by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\" Updated Fri Jan 4 22:15:21 JST 2002
41 .\"     by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
42 .\" Updated 2002-04-14 by Kentaro Shirakata <argrath@ub32.org>
43 .\" Updated 2007-01-01 by Kentaro Shirakata <argrath@ub32.org>
44 .\"
45 .TH SYSLOG 3 2008-11-12 "Linux" "Linux Programmer's Manual"
46 .SH Ì¾Á°
47 closelog, openlog, syslog, vsyslog \- ¥·¥¹¥Æ¥à¥í¥¬¡¼¤Ë¥á¥Ã¥»¡¼¥¸¤òÁ÷¤ë
48 .SH ½ñ¼°
49 .B #include <syslog.h>
50 .sp
51 .BI "void openlog(const char *" ident ", int " option ", int " facility );
52 .br
53 .BI "void syslog(int " priority ", const char *" format ", ...);"
54 .br
55 .B "void closelog(void);"
56 .sp
57 .B #include <stdarg.h>
58 .sp
59 .BI "void vsyslog(int " priority ", const char *" format ", va_list " ap );
60 .sp
61 .in -4n
62 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
63 .RB ( feature_test_macros (7)
64 »²¾È):
65 .in
66 .sp
67 .BR vsyslog ():
68 _BSD_SOURCE
69 .SH ÀâÌÀ
70 .BR closelog ()
71 ¤Ï¥·¥¹¥Æ¥à¤Î¥í¥°µ­Ï¿ÍÑ¥×¥í¥°¥é¥à(¥·¥¹¥Æ¥à¥í¥¬¡¼
72 .BR syslogd (8))
73 ¥Ø¤ÎÀܳ¤ò½ªÎ»¤¹¤ë¡£
74 .BR closelog ()
75 ¤Ïɬ¿Ü¤Ç¤Ï¤Ê¤¤¡£
76 .sp
77 .BR openlog ()
78 ¤Ï¥í¥°¤ò½ÐÎϤ·¤è¤¦¤È¤·¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤«¤é¥í¥°µ­Ï¿ÍÑ¥×¥í¥°¥é¥à¤Ø¤Î
79 Àܳ¤ò³«»Ï¤¹¤ë¡£
80 .I ident
81 ¤Ç»ØÄꤷ¤¿Ê¸»úÎó(Ä̾ï¤Ï
82 .BR openlog ()
83 ¤·¤¿¥×¥í¥°¥é¥à¤Î̾Á°)¤Ï¥í¥°½ÐÎϤΰìʸ°ìʸ¤ËÄɲ䵤졢¤É¤Î¥×¥í¥°¥é¥à
84 ¤¬½ÐÎϤ·¤¿¥í¥°¤«¤ò¼±Ê̤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
85 .I option
86 °ú¤­¿ô¤Ï¡¢
87 .BR openlog ()
88 ¤ÎÆ°ºî¤È¤½¤Î¸å¤Î
89 .BR syslog ()
90 ¤Î¸Æ¤Ó½Ð¤·¤òÀ©¸æ¤¹¤ë¥Õ¥é¥°¤ò»ØÄꤹ¤ë¡£
91 .I facility
92 °ú¤­¿ô¤Ï¡¢¸å¤Ç
93 .BR syslog ()
94 ¤ò¸Æ¤Ó½Ð¤¹ºÝ¤Ë facility ¤¬»ØÄꤵ¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë»ÈÍѤµ¤ì¤ë
95 ¥Ç¥Õ¥©¥ë¥ÈÃͤò·èÄꤹ¤ë¡£
96 .I option
97 ¤È
98 .I facility
99 ¤Ë¤Ä¤¤¤Æ¤Ï¸å½Ò¤¹¤ë¡£
100 .BR openlog ()
101 ¤Ïɬ¿Ü¤Ç¤Ï¤Ê¤¯¡¢É¬Íפ˱þ¤¸¤Æ
102 .BR syslog ()
103 ¤«¤é¸Æ¤Ó½Ð¤µ¤ì¤ë¡£
104 .BR syslog ()
105 ¤¬¸Æ¤Ó½Ð¤·¤¿¾ì¹ç¡¢
106 .I ident
107 ¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤϠNULL ¤Ë¤Ê¤ë¡£
108 .sp
109 .BR syslog ()
110 ¤Ï¥í¥°¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ·¡¢
111 .BR syslogd (8)
112 ¤¬¤½¤Î¥á¥Ã¥»¡¼¥¸¤òµ­Ï¿¤¹¤ë¡£
113 .I priority
114 °ú¤­¿ô¤Ï
115 .I facility
116 ¤È
117 .I level
118 ¤È¤ÎÁȹ礻¤Ç»ØÄꤹ¤ë¡£
119 .I facility
120 ¤È
121 .I level
122 ¤Î¼è¤ê¤¦¤ëÃͤϸå½Ò¤¹¤ë¡£
123 »Ä¤ê¤Î
124 .I format
125 °ú¤­¿ô¤Ï
126 .BR printf (3)
127 ¤È»÷¤¿¥¹¥¿¥¤¥ë¤Î½ñ¼°¤È¤½¤Î½ñ¼°¤ËÍ¿¤¨¤ëÃͤǤ¢¤ë¡£
128 .I format
129 Ãæ¤Î2ʸ»ú
130 .B %m
131 ¤Ï¤½¤Î»þÅÀ¤Ç¤Î
132 .I errno
133 ¤Ë´ØÏ¢¤¹¤ë¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸Ê¸»úÎó
134 .RI ( strerror )
135 ¤Ë¤è¤Ã¤ÆÃÖ¤­´¹¤¨¤é¤ì¤ë¡£
136 ɬÍפʾì¹ç¤ÏËöÈø¤Ë²þ¹Ô¤¬²Ã¤¨¤é¤ì¤ë¡£
137 .BR vsyslog ()
138 ´Ø¿ô¤Ï
139 .BR syslog ()
140 ¤ÈƱ¤¸µ¡Ç½¤ò»ý¤Ä¤¬¡¢²ÄÊÑ°ú¤­¿ô¥ê¥¹¥È¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ëÅÀ¤¬°Û¤Ê¤ë¡£
141 »ØÄꤵ¤ì¤¿°ú¤­¿ô¤Ï¡¢
142 .BR stdarg (3)
143 ²ÄÊÑ°ú¤­¿ô¥ê¥¹¥È¥Þ¥¯¥í¤òÍѤ¤¤Æ¼èÆÀ¤µ¤ì¤ë¡£
144
145 °Ê²¼¤Î¥µ¥Ö¥»¥¯¥·¥ç¥ó¤Ç¤Ï¡¢
146 .I option
147 ¤È
148 .I facility
149 ¤È
150 .I priority
151 ¤ÎÃͤòÀßÄꤹ¤ë¤Î¤Ë»ÈÍѤµ¤ì¤ë¥Ñ¥é¥á¡¼¥¿¤òÀâÌÀ¤¹¤ë¡£
152 .SS option
153 ²¼µ­¤ÎÃͤò OR ¤·¤¿¤â¤Î¤¬
154 .BR openlog ()
155 ¤Î
156 .I option
157 °ú¤­¿ô¤Ë¤Ê¤ë:
158 .TP 15
159 .B LOG_CONS
160 ¥¨¥é¡¼¤¬¤¢¤ì¤Ð¡¢¥·¥¹¥Æ¥à¥í¥¬¡¼¤ËÁ÷¤ë°ìÊý¤Ç¥·¥¹¥Æ¥à¥³¥ó¥½¡¼¥ë¤Ë¤âľÀܽñ¤¯¡£
161 .TP
162 .B LOG_NDELAY
163 ¥í¥°µ­Ï¿ÍÑ¥×¥í¥°¥é¥à¤È¤ÎÀܳ¤ò¨ºÂ¤Ë³«»Ï¤¹¤ë
164 (Ä̾ï¤Ï¡¢ºÇ½é¤Î¥á¥Ã¥»¡¼¥¸¤¬µ­Ï¿¤µ¤ì¤ë»þ¤ËÀܳ¤ò³«¤¯)¡£
165 .TP
166 .B LOG_NOWAIT
167 ¥á¥Ã¥»¡¼¥¸¤òµ­Ï¿¤¹¤ëºÝ¤ËÀ¸À®¤µ¤ì¤ë»Ò¥×¥í¥»¥¹¤Î½ªÎ»¤òÂÔ¤¿¤Ê¤¤¡£
168 (GNU C ¥é¥¤¥Ö¥é¥ê¤Ï»Ò¥×¥í¥»¥¹¤òÀ¸À®¤·¤Ê¤¤¡£
169 ¤·¤¿¤¬¤Ã¤Æ¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï Linux ¤Ç¤Ï̵¸ú¤Ç¤¢¤ë¡£)
170 .TP
171 .B LOG_ODELAY
172 .B LOG_NDELAY
173 ¤ÎÈ¿ÂС£
174 .BR syslog ()
175 ¤¬¸Æ¤Ð¤ì¤ë¤Þ¤Ç¡¢Àܳ¤Î³«»Ï¤ò¹Ô¤ï¤Ê¤¤¡£
176 (¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç¤¢¤ê¡¢Æä˻ØÄꤹ¤ëɬÍפϤʤ¤¡£)
177 .TP
178 .B LOG_PERROR
179 stderr ¤Ë¤â½ÐÎϤ¹¤ë¡£(POSIX.1-2001 ¤Ç¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤)
180 .TP
181 .B LOG_PID
182 ¸Ä¡¹¤Î¥á¥Ã¥»¡¼¥¸¤Ë PID ¤ò´Þ¤á¤ë¡£
183 .SS facility
184 .I facility
185 °ú¤­¿ô¤Ï¥á¥Ã¥»¡¼¥¸¤Ëµ­Ï¿¤µ¤ì¤ë¥×¥í¥°¥é¥à¤Î¥¿¥¤¥×¤ò»ØÄꤹ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
186 ¤³¤ì¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¥¿¥¤¥×¤Î¥×¥í¥°¥é¥à¤«¤é¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Û¤Ê¤ë°·¤¤¤ò
187 ¤¹¤ë¤è¤¦¤ËÀßÄê¥Õ¥¡¥¤¥ë(
188 .BR syslog.conf (5))
189 ¤ËÄêµÁ¤Ç¤­¤ë¡£
190 .TP 15
191 .B LOG_AUTH
192 ¥»¥­¥å¥ê¥Æ¥£/ǧ¾Ú ¥á¥Ã¥»¡¼¥¸
193 (Èó¿ä¾©¡£Âå¤ï¤ê¤Ë
194 .B LOG_AUTHPRIV
195 ¤ò»ÈÍѤ¹¤ë¤³¤È)
196 .TP
197 .B LOG_AUTHPRIV
198 ¥»¥­¥å¥ê¥Æ¥£/ǧ¾Ú ¥á¥Ã¥»¡¼¥¸ (¥×¥é¥¤¥Ù¡¼¥È)
199 .TP
200 .B LOG_CRON
201 ¥¯¥í¥Ã¥¯¥Ç¡¼¥â¥ó
202 .RB ( cron
203 ¤È
204 .RB at )
205 .TP
206 .B LOG_DAEMON
207 ÆÃÄê¤Î facility Ãͤò»ý¤¿¤Ê¤¤¥·¥¹¥Æ¥à¥Ç¡¼¥â¥ó
208 .TP
209 .B LOG_FTP
210 ftp ¥Ç¡¼¥â¥ó
211 .TP
212 .B LOG_KERN
213 ¥«¡¼¥Í¥ë¥á¥Ã¥»¡¼¥¸ (¥æ¡¼¥¶¥×¥í¥»¥¹¤«¤éÀ¸À®¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤)
214 .\" LOG_KERN has the value 0; if used as a facility, zero translates to:
215 .\" "use the default facility".
216 .TP
217 .BR LOG_LOCAL0 " ¤«¤é " LOG_LOCAL7
218 ¥í¡¼¥«¥ë¤Ê»ÈÍѤΤ¿¤á¤Ë¥ê¥¶¡¼¥Ö¤µ¤ì¤Æ¤¤¤ë
219 .TP
220 .B LOG_LPR
221 ¥é¥¤¥ó¥×¥ê¥ó¥¿¡¦¥µ¥Ö¥·¥¹¥Æ¥à
222 .TP
223 .B LOG_MAIL
224 ¥á¡¼¥ë¡¦¥µ¥Ö¥·¥¹¥Æ¥à
225 .TP
226 .B LOG_NEWS
227 USENET ¥Ë¥å¡¼¥¹¡¦¥µ¥Ö¥·¥¹¥Æ¥à
228 .TP
229 .B LOG_SYSLOG
230 .BR syslogd (8)
231 ¤Ë¤è¤Ã¤ÆÆâÉôŪ¤Ëȯ¹Ô¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸
232 .TP
233 .BR LOG_USER " (¥Ç¥Õ¥©¥ë¥È)"
234 °ìÈÌŪ¤Ê¥æ¡¼¥¶¥ì¥Ù¥ë¥á¥Ã¥»¡¼¥¸
235 .TP
236 .B LOG_UUCP
237 UUCP¥µ¥Ö¥·¥¹¥Æ¥à
238 .SS level
239 ¤³¤ì¤Ï¥á¥Ã¥»¡¼¥¸¤ÎÍ¥ÀèÅÙ¤ò»ØÄꤹ¤ë¡£
240 Í¥ÀèÅ٤ι⤤¤â¤Î¤«¤éÄ㤤¤â¤Î¤Î½ç¤Ç²¼µ­¤¹¤ë¡£
241 .TP 15
242 .B LOG_EMERG
243 ¥·¥¹¥Æ¥à¤¬»ÈÍÑÉÔ²Ä
244 .TP
245 .B LOG_ALERT
246 ľ¤Á¤Ë¹ÔÆ°¤òµ¯¤³¤µ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤
247 .TP
248 .B LOG_CRIT
249 ´í¸±¤Ê¾õÂÖ
250 .TP
251 .B LOG_ERR
252 ¥¨¥é¡¼¤Î¾õÂÖ
253 .TP
254 .B LOG_WARNING
255 ¥ï¡¼¥Ë¥ó¥°¤Î¾õÂÖ
256 .TP
257 .B LOG_NOTICE
258 Ä̾ï¤À¤¬½ÅÍפʾõÂÖ
259 .TP
260 .B LOG_INFO
261 ¥¤¥ó¥Õ¥©¥á¡¼¥·¥ç¥ó¥á¥Ã¥»¡¼¥¸
262 .TP
263 .B LOG_DEBUG
264 ¥Ç¥Ð¥Ã¥°¥ì¥Ù¥ë¤Î¥á¥Ã¥»¡¼¥¸
265 .LP
266 .BR setlogmask (3)
267 ´Ø¿ô¤ò»ÈÍѤ·¤Æ¡¢
268 »ØÄꤵ¤ì¤¿¥ì¥Ù¥ë¤Î¥á¥Ã¥»¡¼¥¸¤À¤±¤òµ­Ï¿¤¹¤ë¤è¤¦¤Ë
269 À©¸Â¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
270 .SH ½àµò
271 .BR openlog (),
272 .BR closelog (),
273 .BR syslog ()
274 ¤Ï SUSv2 ¤È POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë
275 (⤷
276 .BR vsyslog ()
277 ¤Ï½ü¤¯)¡£
278 POSIX.1-2001 ¤Ç¤Ï
279 .I facility
280 ¤È¤·¤Æ
281 .B LOG_USER
282 ¤È
283 .B LOG_LOCAL*
284 ¤ÎÃͤ¬µ¬Äꤵ¤ì¤Æ¤¤¤ë¤À¤±¤Ç¤¢¤ë¡£
285 ¤·¤«¤·¤Ê¤¬¤é¡¢
286 .B LOG_AUTHPRIV
287 ¤È
288 .B LOG_FTP
289 ¤È¤¤¤¦Îã³°¤Ï¤¢¤ë¤¬¡¢
290 ¤½¤ì°Ê³°¤Î
291 .I facility
292 ¤ÎÃͤÏ¿¤¯¤Î UNIX ¥·¥¹¥Æ¥à¤Ç»È¤ï¤ì¤Æ¤¤¤ë¡£
293 .I option
294 ¤ÎÃͤÎ
295 .B LOG_PERROR
296 ¤ÎÃͤϡ¢ POSIX.1-2001 ¤Ç¤Ïµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢
297 UNIX ¤Î¿¤¯¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç»ÈÍѲÄǽ¤Ç¤¢¤ë¡£
298 .\" .SH ÍúÎò
299 .\" .BR syslog ()
300 .\" ¥Õ¥¡¥ó¥¯¥·¥ç¥ó¡¦¥³¡¼¥ë¤Ï 4.2BSD ¤«¤é¼ÂÁõ¤µ¤ì¤¿¡£
301 .\" 4.3BSD ¤Ë¤Ï
302 .\" .BR openlog (),
303 .\" .BR syslog (),
304 .\" .BR closelog (),
305 .\" .BR setlogmask ()
306 .\" ¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
307 .\" ¤Þ¤¿¡¢4.3BSD-Reno ¤Ë¤Ï
308 .\" .BR vsyslog ()
309 .\" ¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
310 .\" ÅöÁ³¤Ê¤¬¤é½é´ü¤Î v* ´Ø¿ô¤Ï
311 .\" .I <stdarg.h>
312 .\" ¤È¤Ï¸ß´¹À­¤Î¤Ê¤¤
313 .\" .I <varargs.h>
314 .\" ¤Î»ÅÁȤò»ÈÍѤ·¤¿¤â¤Î¤Ç¤¢¤ë¡£
315 .SH Ãí°Õ
316 .BR openlog ()
317 ¸Æ¤Ó½Ð¤·¤Î
318 .I ident
319 °ú¤­¿ô¤Ï¡¢Ãͤ¬¤½¤Î¤Þ¤ÞÊÝ»ý¤µ¤ì¤Æ¤¤¤ë¤³¤È¤òÁ°Äó¤Ë¤·¤Æ¤¤¤ë¡£
320 ¤½¤ì¤æ¤¨¡¢
321 .I ident
322 ¤Ç»ØÄꤵ¤ì¤¿Ê¸»úÎó¤¬Êѹ¹¤µ¤ì¤ë¤È¡¢
323 .BR syslog ()
324 ¤ÏÊѹ¹¤µ¤ì¤¿Ê¸»úÎó¤ÎÄɲ乤ë¤À¤í¤¦¤·¡¢
325 »ØÄꤵ¤ì¤¿Ê¸»úÎó¤¬Â¸ºß¤·¤Ê¤¯¤Ê¤Ã¤¿¾ì¹ç¡¢·ë²Ì¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£
326 ºÇ¤â°Ü¿¢À­¤¬¤¢¤ëÊýË¡¤Ï¡¢Ê¸»úÎóÄê¿ô¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¤¢¤ë¡£
327 .LP
328 ¥æ¡¼¥¶¡¼¤«¤éÍ¿¤¨¤é¤ì¤¿¥Ç¡¼¥¿¤ò format ¤È¤·¤ÆÅϤ·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
329 Âå¤ï¤ê¤Ë°Ê²¼¤ò»È¤¦¤³¤È¡£
330 .nf
331
332     syslog(priority, "%s", string);
333 .fi
334 .SH ´ØÏ¢¹àÌÜ
335 .BR logger (1),
336 .BR setlogmask (3),
337 .BR syslog.conf (5),
338 .BR syslogd (8)