OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / draft / 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 .\"O .SH NAME
47 .\"O closelog, openlog, syslog, vsyslog \- send messages to the system logger
48 .SH Ì¾Á°
49 closelog, openlog, syslog, vsyslog \- ¥·¥¹¥Æ¥à¥í¥¬¡¼¤Ë¥á¥Ã¥»¡¼¥¸¤òÁ÷¤ë
50 .\"O .SH SYNOPSIS
51 .SH ½ñ¼°
52 .B #include <syslog.h>
53 .sp
54 .BI "void openlog(const char *" ident ", int " option ", int " facility );
55 .br
56 .BI "void syslog(int " priority ", const char *" format ", ...);"
57 .br
58 .B "void closelog(void);"
59 .sp
60 .B #include <stdarg.h>
61 .sp
62 .BI "void vsyslog(int " priority ", const char *" format ", va_list " ap );
63 .sp
64 .in -4n
65 .\"O Feature Test Macro Requirements for glibc (see
66 .\"O .BR feature_test_macros (7)):
67 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
68 .RB ( feature_test_macros (7)
69 »²¾È):
70 .in
71 .sp
72 .BR vsyslog ():
73 _BSD_SOURCE
74 .\"O .SH DESCRIPTION
75 .SH ÀâÌÀ
76 .\"O .BR closelog ()
77 .\"O closes the descriptor being used to write to the system logger.
78 .\"O The use of
79 .\"O .BR closelog ()
80 .\"O is optional.
81 .BR closelog ()
82 ¤Ï¥·¥¹¥Æ¥à¤Î¥í¥°µ­Ï¿ÍÑ¥×¥í¥°¥é¥à(¥·¥¹¥Æ¥à¥í¥¬¡¼
83 .BR syslogd (8))
84 ¥Ø¤ÎÀܳ¤ò½ªÎ»¤¹¤ë¡£
85 .BR closelog ()
86 ¤Ïɬ¿Ü¤Ç¤Ï¤Ê¤¤¡£
87 .sp
88 .\"O .BR openlog ()
89 .\"O opens a connection to the system logger for a program.
90 .BR openlog ()
91 ¤Ï¥í¥°¤ò½ÐÎϤ·¤è¤¦¤È¤·¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤«¤é¥í¥°µ­Ï¿ÍÑ¥×¥í¥°¥é¥à¤Ø¤Î
92 Àܳ¤ò³«»Ï¤¹¤ë¡£
93 .\"O The string pointed
94 .\"O to by
95 .\"O .I ident
96 .\"O is prepended to every message, and is typically set to the program name.
97 .I ident
98 ¤Ç»ØÄꤷ¤¿Ê¸»úÎó(Ä̾ï¤Ï
99 .BR openlog ()
100 ¤·¤¿¥×¥í¥°¥é¥à¤Î̾Á°)¤Ï¥í¥°½ÐÎϤΰìʸ°ìʸ¤ËÄɲ䵤졢¤É¤Î¥×¥í¥°¥é¥à
101 ¤¬½ÐÎϤ·¤¿¥í¥°¤«¤ò¼±Ê̤¹¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
102 .\"O The
103 .\"O .I option
104 .\"O argument specifies flags which control the operation of
105 .\"O .BR openlog ()
106 .\"O and subsequent calls to
107 .\"O .BR syslog ().
108 .I option
109 °ú¤­¿ô¤Ï¡¢
110 .BR openlog ()
111 ¤ÎÆ°ºî¤È¤½¤Î¸å¤Î
112 .BR syslog ()
113 ¤Î¸Æ¤Ó½Ð¤·¤òÀ©¸æ¤¹¤ë¥Õ¥é¥°¤ò»ØÄꤹ¤ë¡£
114 .\"O The
115 .\"O .I facility
116 .\"O argument establishes a default to be used if
117 .\"O none is specified in subsequent calls to
118 .\"O .BR syslog ().
119 .I facility
120 °ú¤­¿ô¤Ï¡¢¸å¤Ç
121 .BR syslog ()
122 ¤ò¸Æ¤Ó½Ð¤¹ºÝ¤Ë facility ¤¬»ØÄꤵ¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë»ÈÍѤµ¤ì¤ë
123 ¥Ç¥Õ¥©¥ë¥ÈÃͤò·èÄꤹ¤ë¡£
124 .\"O Values for
125 .\"O .I option
126 .\"O and
127 .\"O .I facility
128 .\"O are given below.
129 .\"O The use of
130 .\"O .BR openlog ()
131 .\"O is optional; it will automatically be called by
132 .\"O .BR syslog ()
133 .\"O if necessary, in which case
134 .\"O .I ident
135 .\"O will default to NULL.
136 .I option
137 ¤È
138 .I facility
139 ¤Ë¤Ä¤¤¤Æ¤Ï¸å½Ò¤¹¤ë¡£
140 .BR openlog ()
141 ¤Ïɬ¿Ü¤Ç¤Ï¤Ê¤¯¡¢É¬Íפ˱þ¤¸¤Æ
142 .BR syslog ()
143 ¤«¤é¸Æ¤Ó½Ð¤µ¤ì¤ë¡£
144 .BR syslog ()
145 ¤¬¸Æ¤Ó½Ð¤·¤¿¾ì¹ç¡¢
146 .I ident
147 ¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤϠNULL ¤Ë¤Ê¤ë¡£
148 .sp
149 .\"O .BR syslog ()
150 .\"O generates a log message, which will be distributed by
151 .\"O .BR syslogd (8).
152 .BR syslog ()
153 ¤Ï¥í¥°¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ·¡¢
154 .BR syslogd (8)
155 ¤¬¤½¤Î¥á¥Ã¥»¡¼¥¸¤òµ­Ï¿¤¹¤ë¡£
156 .\"O The
157 .\"O .I priority
158 .\"O argument is formed by ORing the
159 .\"O .I facility
160 .\"O and the
161 .\"O .I level
162 .\"O values (explained below).
163 .I priority
164 °ú¤­¿ô¤Ï
165 .I facility
166 ¤È
167 .I level
168 ¤È¤ÎÁȹ礻¤Ç»ØÄꤹ¤ë¡£
169 .I facility
170 ¤È
171 .I level
172 ¤Î¼è¤ê¤¦¤ëÃͤϸå½Ò¤¹¤ë¡£
173 .\"O The remaining arguments
174 .\"O are a
175 .\"O .IR format ,
176 .\"O as in
177 .\"O .BR printf (3)
178 .\"O and any arguments required by the
179 .\"O .IR format ,
180 .\"O except that the two character sequence
181 .\"O .B %m
182 .\"O will be replaced by
183 .\"O the error message string
184 .\"O .IR strerror ( errno ).
185 .\"O A trailing newline may be added if needed.
186 »Ä¤ê¤Î
187 .I format
188 °ú¤­¿ô¤Ï
189 .BR printf (3)
190 ¤È»÷¤¿¥¹¥¿¥¤¥ë¤Î½ñ¼°¤È¤½¤Î½ñ¼°¤ËÍ¿¤¨¤ëÃͤǤ¢¤ë¡£
191 .I format
192 Ãæ¤Î2ʸ»ú
193 .B %m
194 ¤Ï¤½¤Î»þÅÀ¤Ç¤Î
195 .I errno
196 ¤Ë´ØÏ¢¤¹¤ë¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸Ê¸»úÎó
197 .RI ( strerror )
198 ¤Ë¤è¤Ã¤ÆÃÖ¤­´¹¤¨¤é¤ì¤ë¡£
199 ɬÍפʾì¹ç¤ÏËöÈø¤Ë²þ¹Ô¤¬²Ã¤¨¤é¤ì¤ë¡£
200 .\"O The function
201 .\"O .BR vsyslog ()
202 .\"O performs the same task as
203 .\"O .BR syslog ()
204 .\"O with the difference that it takes a set of arguments which have
205 .\"O been obtained using the
206 .\"O .BR stdarg (3)
207 .\"O variable argument list macros.
208 .BR vsyslog ()
209 ´Ø¿ô¤Ï
210 .BR syslog ()
211 ¤ÈƱ¤¸µ¡Ç½¤ò»ý¤Ä¤¬¡¢²ÄÊÑ°ú¤­¿ô¥ê¥¹¥È¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ëÅÀ¤¬°Û¤Ê¤ë¡£
212 »ØÄꤵ¤ì¤¿°ú¤­¿ô¤Ï¡¢
213 .BR stdarg (3)
214 ²ÄÊÑ°ú¤­¿ô¥ê¥¹¥È¥Þ¥¯¥í¤òÍѤ¤¤Æ¼èÆÀ¤µ¤ì¤ë¡£
215
216 .\"O The subsections below list the parameters used to set the values of
217 .\"O .IR option , " facility" ", and " priority .
218 .\"O .SS option
219 .\"O The
220 .\"O .I option
221 .\"O argument to
222 .\"O .BR openlog ()
223 .\"O is an OR of any of these:
224 °Ê²¼¤Î¥µ¥Ö¥»¥¯¥·¥ç¥ó¤Ç¤Ï¡¢
225 .I option
226 ¤È
227 .I facility
228 ¤È
229 .I priority
230 ¤ÎÃͤòÀßÄꤹ¤ë¤Î¤Ë»ÈÍѤµ¤ì¤ë¥Ñ¥é¥á¡¼¥¿¤òÀâÌÀ¤¹¤ë¡£
231 .SS option
232 ²¼µ­¤ÎÃͤò OR ¤·¤¿¤â¤Î¤¬
233 .BR openlog ()
234 ¤Î
235 .I option
236 °ú¤­¿ô¤Ë¤Ê¤ë:
237 .TP 15
238 .B LOG_CONS
239 .\"O Write directly to system console if there is an error while sending to
240 .\"O system logger.
241 ¥¨¥é¡¼¤¬¤¢¤ì¤Ð¡¢¥·¥¹¥Æ¥à¥í¥¬¡¼¤ËÁ÷¤ë°ìÊý¤Ç¥·¥¹¥Æ¥à¥³¥ó¥½¡¼¥ë¤Ë¤âľÀܽñ¤¯¡£
242 .TP
243 .B LOG_NDELAY
244 .\"O Open the connection immediately (normally, the connection is opened when
245 .\"O the first message is logged).
246 ¥í¥°µ­Ï¿ÍÑ¥×¥í¥°¥é¥à¤È¤ÎÀܳ¤ò¨ºÂ¤Ë³«»Ï¤¹¤ë
247 (Ä̾ï¤Ï¡¢ºÇ½é¤Î¥á¥Ã¥»¡¼¥¸¤¬µ­Ï¿¤µ¤ì¤ë»þ¤ËÀܳ¤ò³«¤¯)¡£
248 .TP
249 .B LOG_NOWAIT
250 .\"O Don't wait for child processes that may have been created while logging
251 .\"O the message.
252 .\"O (The GNU C library does not create a child process, so this
253 .\"O option has no effect on Linux.)
254 ¥á¥Ã¥»¡¼¥¸¤òµ­Ï¿¤¹¤ëºÝ¤ËÀ¸À®¤µ¤ì¤ë»Ò¥×¥í¥»¥¹¤Î½ªÎ»¤òÂÔ¤¿¤Ê¤¤¡£
255 (GNU C ¥é¥¤¥Ö¥é¥ê¤Ï»Ò¥×¥í¥»¥¹¤òÀ¸À®¤·¤Ê¤¤¡£
256 ¤·¤¿¤¬¤Ã¤Æ¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï Linux ¤Ç¤Ï̵¸ú¤Ç¤¢¤ë¡£)
257 .TP
258 .B LOG_ODELAY
259 .\"O The converse of
260 .\"O .BR LOG_NDELAY ;
261 .\"O opening of the connection is delayed until
262 .\"O .BR syslog ()
263 .\"O is called.
264 .\"O (This is the default, and need not be specified.)
265 .B LOG_NDELAY
266 ¤ÎÈ¿ÂС£
267 .BR syslog ()
268 ¤¬¸Æ¤Ð¤ì¤ë¤Þ¤Ç¡¢Àܳ¤Î³«»Ï¤ò¹Ô¤ï¤Ê¤¤¡£
269 (¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç¤¢¤ê¡¢Æä˻ØÄꤹ¤ëɬÍפϤʤ¤¡£)
270 .TP
271 .B LOG_PERROR
272 .\"O (Not in POSIX.1-2001.)
273 .\"O Print to stderr as well.
274 stderr ¤Ë¤â½ÐÎϤ¹¤ë¡£(POSIX.1-2001 ¤Ç¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤)
275 .TP
276 .B LOG_PID
277 .\"O Include PID with each message.
278 ¸Ä¡¹¤Î¥á¥Ã¥»¡¼¥¸¤Ë PID ¤ò´Þ¤á¤ë¡£
279 .\"O .SS facility
280 .SS facility
281 .\"O The
282 .\"O .I facility
283 .\"O argument is used to specify what type of program is logging the message.
284 .\"O This lets the configuration file specify that messages from different
285 .\"O facilities will be handled differently.
286 .I facility
287 °ú¤­¿ô¤Ï¥á¥Ã¥»¡¼¥¸¤Ëµ­Ï¿¤µ¤ì¤ë¥×¥í¥°¥é¥à¤Î¥¿¥¤¥×¤ò»ØÄꤹ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë¡£
288 ¤³¤ì¤Ë¤è¤Ã¤Æ°Û¤Ê¤ë¥¿¥¤¥×¤Î¥×¥í¥°¥é¥à¤«¤é¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Û¤Ê¤ë°·¤¤¤ò
289 ¤¹¤ë¤è¤¦¤ËÀßÄê¥Õ¥¡¥¤¥ë(
290 .BR syslog.conf (5))
291 ¤ËÄêµÁ¤Ç¤­¤ë¡£
292 .TP 15
293 .B LOG_AUTH
294 .\"O security/authorization messages (DEPRECATED Use
295 .\"O .B LOG_AUTHPRIV
296 .\"O instead)
297 ¥»¥­¥å¥ê¥Æ¥£/ǧ¾Ú ¥á¥Ã¥»¡¼¥¸
298 (Èó¿ä¾©¡£Âå¤ï¤ê¤Ë
299 .B LOG_AUTHPRIV
300 ¤ò»ÈÍѤ¹¤ë¤³¤È)
301 .TP
302 .B LOG_AUTHPRIV
303 .\"O security/authorization messages (private)
304 ¥»¥­¥å¥ê¥Æ¥£/ǧ¾Ú ¥á¥Ã¥»¡¼¥¸ (¥×¥é¥¤¥Ù¡¼¥È)
305 .TP
306 .B LOG_CRON
307 .\"O clock daemon
308 .\"O .RB ( cron " and " at )
309 ¥¯¥í¥Ã¥¯¥Ç¡¼¥â¥ó
310 .RB ( cron
311 ¤È
312 .RB at )
313 .TP
314 .B LOG_DAEMON
315 .\"O system daemons without separate facility value
316 ÆÃÄê¤Î facility Ãͤò»ý¤¿¤Ê¤¤¥·¥¹¥Æ¥à¥Ç¡¼¥â¥ó
317 .TP
318 .B LOG_FTP
319 .\"O ftp daemon
320 ftp ¥Ç¡¼¥â¥ó
321 .TP
322 .B LOG_KERN
323 .\"O kernel messages (these can't be generated from user processes)
324 ¥«¡¼¥Í¥ë¥á¥Ã¥»¡¼¥¸ (¥æ¡¼¥¶¥×¥í¥»¥¹¤«¤éÀ¸À®¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤)
325 .\" LOG_KERN has the value 0; if used as a facility, zero translates to:
326 .\" "use the default facility".
327 .TP
328 .\"O .BR LOG_LOCAL0 " through " LOG_LOCAL7
329 .\"O reserved for local use
330 .BR LOG_LOCAL0 " ¤«¤é " LOG_LOCAL7
331 ¥í¡¼¥«¥ë¤Ê»ÈÍѤΤ¿¤á¤Ë¥ê¥¶¡¼¥Ö¤µ¤ì¤Æ¤¤¤ë
332 .TP
333 .B LOG_LPR
334 .\"O line printer subsystem
335 ¥é¥¤¥ó¥×¥ê¥ó¥¿¡¦¥µ¥Ö¥·¥¹¥Æ¥à
336 .TP
337 .B LOG_MAIL
338 .\"O mail subsystem
339 ¥á¡¼¥ë¡¦¥µ¥Ö¥·¥¹¥Æ¥à
340 .TP
341 .B LOG_NEWS
342 .\"O USENET news subsystem
343 USENET ¥Ë¥å¡¼¥¹¡¦¥µ¥Ö¥·¥¹¥Æ¥à
344 .TP
345 .B LOG_SYSLOG
346 .\"O messages generated internally by
347 .\"O .BR syslogd (8)
348 .BR syslogd (8)
349 ¤Ë¤è¤Ã¤ÆÆâÉôŪ¤Ëȯ¹Ô¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸
350 .TP
351 .\"O .BR LOG_USER " (default)"
352 .BR LOG_USER " (¥Ç¥Õ¥©¥ë¥È)"
353 .\"O generic user-level messages
354 °ìÈÌŪ¤Ê¥æ¡¼¥¶¥ì¥Ù¥ë¥á¥Ã¥»¡¼¥¸
355 .TP
356 .B LOG_UUCP
357 .\"O UUCP subsystem
358 UUCP¥µ¥Ö¥·¥¹¥Æ¥à
359 .SS level
360 .\"O This determines the importance of the message.
361 .\"O The levels are, in order of decreasing importance:
362 ¤³¤ì¤Ï¥á¥Ã¥»¡¼¥¸¤ÎÍ¥ÀèÅÙ¤ò»ØÄꤹ¤ë¡£
363 Í¥ÀèÅ٤ι⤤¤â¤Î¤«¤éÄ㤤¤â¤Î¤Î½ç¤Ç²¼µ­¤¹¤ë¡£
364 .TP 15
365 .B LOG_EMERG
366 .\"O system is unusable
367 ¥·¥¹¥Æ¥à¤¬»ÈÍÑÉÔ²Ä
368 .TP
369 .B LOG_ALERT
370 .\"O action must be taken immediately
371 ľ¤Á¤Ë¹ÔÆ°¤òµ¯¤³¤µ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤
372 .TP
373 .B LOG_CRIT
374 .\"O critical conditions
375 ´í¸±¤Ê¾õÂÖ
376 .TP
377 .B LOG_ERR
378 .\"O error conditions
379 ¥¨¥é¡¼¤Î¾õÂÖ
380 .TP
381 .B LOG_WARNING
382 .\"O warning conditions
383 ¥ï¡¼¥Ë¥ó¥°¤Î¾õÂÖ
384 .TP
385 .B LOG_NOTICE
386 .\"O normal, but significant, condition
387 Ä̾ï¤À¤¬½ÅÍפʾõÂÖ
388 .TP
389 .B LOG_INFO
390 .\"O informational message
391 ¥¤¥ó¥Õ¥©¥á¡¼¥·¥ç¥ó¥á¥Ã¥»¡¼¥¸
392 .TP
393 .B LOG_DEBUG
394 .\"O debug-level message
395 ¥Ç¥Ð¥Ã¥°¥ì¥Ù¥ë¤Î¥á¥Ã¥»¡¼¥¸
396 .LP
397 .\"O The function
398 .\"O .BR setlogmask (3)
399 .\"O can be used to restrict logging to specified levels only.
400 .BR setlogmask (3)
401 ´Ø¿ô¤ò»ÈÍѤ·¤Æ¡¢
402 »ØÄꤵ¤ì¤¿¥ì¥Ù¥ë¤Î¥á¥Ã¥»¡¼¥¸¤À¤±¤òµ­Ï¿¤¹¤ë¤è¤¦¤Ë
403 À©¸Â¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
404 .\"O .SH "CONFORMING TO"
405 .SH ½àµò
406 .\"O The functions
407 .\"O .BR openlog (),
408 .\"O .BR closelog (),
409 .\"O and
410 .\"O .BR syslog ()
411 .\"O (but not
412 .\"O .BR vsyslog ())
413 .\"O are specified in SUSv2 and POSIX.1-2001.
414 .BR openlog (),
415 .BR closelog (),
416 .BR syslog ()
417 ¤Ï SUSv2 ¤È POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë
418 (⤷
419 .BR vsyslog ()
420 ¤Ï½ü¤¯)¡£
421 .\"O POSIX.1-2001 specifies only the
422 .\"O .B LOG_USER
423 .\"O and
424 .\"O .B LOG_LOCAL*
425 .\"O values for
426 .\"O .IR facility .
427 POSIX.1-2001 ¤Ç¤Ï
428 .I facility
429 ¤È¤·¤Æ
430 .B LOG_USER
431 ¤È
432 .B LOG_LOCAL*
433 ¤ÎÃͤ¬µ¬Äꤵ¤ì¤Æ¤¤¤ë¤À¤±¤Ç¤¢¤ë¡£
434 .\"O However, with the exception of
435 .\"O .B LOG_AUTHPRIV
436 .\"O and
437 .\"O .BR LOG_FTP ,
438 .\"O the other
439 .\"O .I facility
440 .\"O values appear on most UNIX systems.
441 ¤·¤«¤·¤Ê¤¬¤é¡¢
442 .B LOG_AUTHPRIV
443 ¤È
444 .B LOG_FTP
445 ¤È¤¤¤¦Îã³°¤Ï¤¢¤ë¤¬¡¢
446 ¤½¤ì°Ê³°¤Î
447 .I facility
448 ¤ÎÃͤÏ¿¤¯¤Î UNIX ¥·¥¹¥Æ¥à¤Ç»È¤ï¤ì¤Æ¤¤¤ë¡£
449 .\"O The
450 .\"O .B LOG_PERROR
451 .\"O value for
452 .\"O .I option
453 .\"O is not specified by POSIX.1-2001, but is available
454 .\"O in most versions of UNIX.
455 .I option
456 ¤ÎÃͤÎ
457 .B LOG_PERROR
458 ¤ÎÃͤϡ¢ POSIX.1-2001 ¤Ç¤Ïµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢
459 UNIX ¤Î¿¤¯¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç»ÈÍѲÄǽ¤Ç¤¢¤ë¡£
460 .\"O .\" .SH HISTORY
461 .\" .SH ÍúÎò
462 .\"O .\" A
463 .\"O .\" .BR syslog ()
464 .\"O .\" function call appeared in 4.2BSD.
465 .\" .BR syslog ()
466 .\" ¥Õ¥¡¥ó¥¯¥·¥ç¥ó¡¦¥³¡¼¥ë¤Ï 4.2BSD ¤«¤é¼ÂÁõ¤µ¤ì¤¿¡£
467 .\"O .\" 4.3BSD documents
468 .\"O .\" .BR openlog (),
469 .\"O .\" .BR syslog (),
470 .\"O .\" .BR closelog (),
471 .\"O .\" and
472 .\"O .\" .BR setlogmask ().
473 .\" 4.3BSD ¤Ë¤Ï
474 .\" .BR openlog (),
475 .\" .BR syslog (),
476 .\" .BR closelog (),
477 .\" .BR setlogmask ()
478 .\" ¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
479 .\"O .\" 4.3BSD-Reno also documents
480 .\"O .\" .BR vsyslog ().
481 .\" ¤Þ¤¿¡¢4.3BSD-Reno ¤Ë¤Ï
482 .\" .BR vsyslog ()
483 .\" ¤¬¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
484 .\"O .\" Of course early v* functions used the
485 .\"O .\" .I <varargs.h>
486 .\"O .\" mechanism, which is not compatible with
487 .\"O .\" .IR <stdarg.h> .
488 .\" ÅöÁ³¤Ê¤¬¤é½é´ü¤Î v* ´Ø¿ô¤Ï
489 .\" .I <stdarg.h>
490 .\" ¤È¤Ï¸ß´¹À­¤Î¤Ê¤¤
491 .\" .I <varargs.h>
492 .\" ¤Î»ÅÁȤò»ÈÍѤ·¤¿¤â¤Î¤Ç¤¢¤ë¡£
493 .\"O .SH NOTES
494 .SH Ãí°Õ
495 .\"O The argument
496 .\"O .I ident
497 .\"O in the call of
498 .\"O .BR openlog ()
499 .\"O is probably stored as-is.
500 .BR openlog ()
501 ¸Æ¤Ó½Ð¤·¤Î
502 .I ident
503 °ú¤­¿ô¤Ï¡¢Ãͤ¬¤½¤Î¤Þ¤ÞÊÝ»ý¤µ¤ì¤Æ¤¤¤ë¤³¤È¤òÁ°Äó¤Ë¤·¤Æ¤¤¤ë¡£
504 .\"O Thus, if the string it points to
505 .\"O is changed,
506 .\"O .BR syslog ()
507 .\"O may start prepending the changed string, and if the string
508 .\"O it points to ceases to exist, the results are undefined.
509 ¤½¤ì¤æ¤¨¡¢
510 .I ident
511 ¤Ç»ØÄꤵ¤ì¤¿Ê¸»úÎó¤¬Êѹ¹¤µ¤ì¤ë¤È¡¢
512 .BR syslog ()
513 ¤ÏÊѹ¹¤µ¤ì¤¿Ê¸»úÎó¤ÎÄɲ乤ë¤À¤í¤¦¤·¡¢
514 »ØÄꤵ¤ì¤¿Ê¸»úÎó¤¬Â¸ºß¤·¤Ê¤¯¤Ê¤Ã¤¿¾ì¹ç¡¢·ë²Ì¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£
515 .\"O Most portable is to use a string constant.
516 ºÇ¤â°Ü¿¢À­¤¬¤¢¤ëÊýË¡¤Ï¡¢Ê¸»úÎóÄê¿ô¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¤¢¤ë¡£
517 .LP
518 .\"O Never pass a string with user-supplied data as a format,
519 .\"O use the following instead:
520 ¥æ¡¼¥¶¡¼¤«¤éÍ¿¤¨¤é¤ì¤¿¥Ç¡¼¥¿¤ò format ¤È¤·¤ÆÅϤ·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
521 Âå¤ï¤ê¤Ë°Ê²¼¤ò»È¤¦¤³¤È¡£
522 .nf
523
524     syslog(priority, "%s", string);
525 .fi
526 .\"O .SH "SEE ALSO"
527 .SH ´ØÏ¢¹àÌÜ
528 .BR logger (1),
529 .BR setlogmask (3),
530 .BR syslog.conf (5),
531 .BR syslogd (8)