File: syslog.3

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (336 lines) | stat: -rw-r--r-- 7,865 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
.\" Written  Feb 1994 by Steve Greenland (stevegr@neosoft.com)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Updated 1999.12.19 by Karl M. Hegbloom <karlheg@debian.org>
.\"
.\" Updated 13 Oct 2001, Michael Kerrisk <mtk.manpages@gmail.com>
.\"	Added description of vsyslog
.\"	Added descriptions of LOG_ODELAY and LOG_NOWAIT
.\"	Added brief description of facility and option arguments
.\"	Added CONFORMING TO section
.\" 2001-10-13, aeb, minor changes
.\" Modified 13 Dec 2001, Martin Schulze <joey@infodrom.org>
.\" Modified 3 Jan 2002, Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" Japanese Verion Copyright (c) 1996 Shoichi OZAWA
.\"	all right reserved.
.\" Translated Sep 1 20:14:01 JST 1996
.\"	by Shoichi OZAWA <ozawa@omika.hitachi.co.jp>
.\" Updated Thu Oct 18 01:00:02 JST 2001
.\"     by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated Fri Jan 4 22:15:21 JST 2002
.\"     by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2002-04-14 by Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2007-01-01 by Kentaro Shirakata <argrath@ub32.org>
.\"
.TH SYSLOG 3 2007-07-26 "Linux" "Linux Programmer's Manual"
.SH ̾
closelog, openlog, syslog, vsyslog \- ƥ˥å
.SH 
.B #include <syslog.h>
.sp
.BI "void openlog(const char *" ident ", int " option ", int " facility );
.br
.BI "void syslog(int " priority ", const char *" format ", ...);"
.br
.B "void closelog(void);"
.sp
.B #include <stdarg.h>
.sp
.BI "void vsyslog(int " priority ", const char *" format ", va_list " ap );
.sp
.in -4n
glibc εǽޥ׷
.RB ( feature_test_macros (7)
):
.in
.sp
.BR vsyslog ():
_BSD_SOURCE
.SH 
.BR closelog ()
ϥƥΥϿѥץ(ƥ
.BR syslogd (8))
ؤ³λ롣
.BR closelog ()
ɬܤǤϤʤ
.sp
.BR openlog ()
ϥϤ褦ȤƤץफϿѥץؤ
³򳫻Ϥ롣
.I ident
ǻꤷʸ(̾
.BR openlog ()
ץ̾)ϥϤΰʸʸɲä졢ɤΥץ
Ϥ̤뤿˻Ȥ롣
.I option
ϡ
.BR openlog ()
ưȤθ
.BR syslog ()
θƤӽФ椹ե饰ꤹ롣
.I facility
ϡ
.BR syslog ()
ƤӽФݤ facility ꤵʤä˻Ѥ
ǥեͤꤹ롣
.I option

.I facility
ˤĤƤϸҤ롣
.BR openlog ()
ɬܤǤϤʤɬפ˱
.BR syslog ()
ƤӽФ롣
.BR syslog ()
ƤӽФ硢
.I ident
Υǥեͤ NULL ˤʤ롣
.sp
.BR syslog ()
ϥåϤ
.BR syslogd (8)
ΥåϿ롣
.I priority

.I facility

.I level
Ȥȹ礻ǻꤹ롣
.I facility

.I level
μꤦͤϸҤ롣
Ĥ
.I format

.BR printf (3)
Ȼν񼰤Ȥν񼰤ͿͤǤ롣
.I format
.B %m
ϤλǤ
.I errno
˴Ϣ륨顼åʸ
.RI ( strerror )
ˤä֤롣
ɬפʾ˲Ԥä롣
.BR vsyslog ()
ؿ
.BR syslog ()
ƱǽĤѰꥹȤꤹ뤳ȤǤۤʤ롣
ꤵ줿ϡ
.BR stdarg (3)
ѰꥹȥޥѤƼ롣

ʲΥ֥Ǥϡ
.I option

.I facility

.I priority
ͤꤹΤ˻Ѥѥ᡼롣
.SS option
ͤ OR Τ
.BR openlog ()

.I option
ˤʤ:
.TP
.B LOG_CONS
顼Сƥǥƥॳ󥽡ˤľܽ񤯡
.TP
.B LOG_NDELAY
ϿѥץȤ³¨¤˳Ϥ
(̾ϡǽΥåϿ³򳫤)
.TP
.B LOG_NOWAIT
åϿݤҥץνλԤʤ
(GNU C 饤֥ϻҥץʤ
äơΥץ Linux Ǥ̵Ǥ롣)
.TP
.B LOG_ODELAY
.B LOG_NDELAY
ȿС
.BR syslog ()
ƤФޤǡ³γϤԤʤ
(ΥץϥǥեȤǤꡢä˻ꤹɬפϤʤ)
.TP
.B LOG_PERROR
stderr ˤϤ롣(POSIX.1-2001 ǤƤʤ)
.TP
.B LOG_PID
ġΥå PID ޤ롣
.SS facility
.I facility
ϥå˵ϿץΥפꤹ뤿˻Ȥ롣
ˤäưۤʤ륿פΥץफΥåϰۤʤ밷
褦ե(
.BR syslog.conf (5))
Ǥ롣
.TP
.B LOG_AUTH
ƥ/ǧ å
(侩
.B LOG_AUTHPRIV
Ѥ뤳)
.TP
.B LOG_AUTHPRIV
ƥ/ǧ å (ץ饤١)
.TP
.B LOG_CRON
åǡ
.RB ( cron

.RB at )
.TP
.B LOG_DAEMON
 facility ͤʤƥǡ
.TP
.B LOG_FTP
ftp ǡ
.TP
.B LOG_KERN
ͥå
.TP
.BR LOG_LOCAL0 "  " LOG_LOCAL7
ʻѤΤ˥ꥶ֤Ƥ
.TP
.B LOG_LPR
饤ץ󥿡֥ƥ
.TP
.B LOG_MAIL
᡼롦֥ƥ
.TP
.B LOG_NEWS
USENET ˥塼֥ƥ
.TP
.B LOG_SYSLOG
.BR syslogd (8)
ˤäŪȯԤå
.TP
.BR LOG_USER " (ǥե)"
Ūʥ桼٥å
.TP
.B LOG_UUCP
UUCP֥ƥ
.SS level
ϥåͥ٤ꤹ롣
ͥ٤ι⤤Τ㤤ΤνDz롣
.TP
.B LOG_EMERG
ƥबԲ
.TP
.B LOG_ALERT
ľ˹ư򵯤ʤФʤʤ
.TP
.B LOG_CRIT
ʾ
.TP
.B LOG_ERR
顼ξ
.TP
.B LOG_WARNING
˥󥰤ξ
.TP
.B LOG_NOTICE
̾פʾ
.TP
.B LOG_INFO
ե᡼å
.TP
.B LOG_DEBUG
ǥХå٥Υå
.LP
.BR setlogmask (3)
ؿѤơ
ꤵ줿٥ΥåϿ褦
¤뤳ȤǤ롣
.SH 
.BR openlog (),
.BR closelog (),
.BR syslog ()
 SUSv2  POSIX.1-2001 ǵꤵƤ
.BR vsyslog ()
Ͻ)
POSIX.1-2001 Ǥ
.I facility
Ȥ
.B LOG_USER

.B LOG_LOCAL*
ͤꤵƤǤ롣
ʤ顢
.B LOG_AUTHPRIV

.B LOG_FTP
Ȥ㳰Ϥ뤬
ʳ
.I facility
ͤ¿ Unix ƥǻȤƤ롣
.I option
ͤ
.B LOG_PERROR
ͤϡ POSIX.1-2001 ǤϵꤵƤʤ
Unix ¿ΥСǻѲǽǤ롣
.\" .SH 
.\" .BR syslog ()
.\" ե󥯥󡦥 4.2BSD 줿
.\" 4.3BSD ˤ
.\" .BR openlog (),
.\" .BR syslog (),
.\" .BR closelog (),
.\" .BR setlogmask ()
.\" Ƥ롣
.\" ޤ4.3BSD-Reno ˤ
.\" .BR vsyslog ()
.\" Ƥ롣
.\" ʤ v* ؿ
.\" .I <stdarg.h>
.\" ȤϸߴΤʤ
.\" .I <varargs.h>
.\" λȤѤΤǤ롣
.SH 
.BR openlog ()
ƤӽФ
.I ident
ϡͤΤޤݻƤ뤳ȤˤƤ롣
.I ident
ǻꤵ줿ʸѹȡ
.BR syslog ()
ѹ줿ʸɲä
ꤵ줿ʸ¸ߤʤʤä硢̤̤Ǥ롣
ǤܿˡϡʸѤ뤳ȤǤ롣
.LP
桼Ϳ줿ǡ format ȤϤƤϤʤʤ
˰ʲȤȡ
.nf

    syslog(priority, "%s", string);
.fi
.SH Ϣ
.BR logger (1),
.BR setlogmask (3),
.BR syslog.conf (5),
.BR syslogd (8)