-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathopenlog.xml
More file actions
175 lines (174 loc) · 5.63 KB
/
openlog.xml
File metadata and controls
175 lines (174 loc) · 5.63 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- splitted from ./it/functions/network.xml, last change in rev 1.1 -->
<!-- last change to 'openlog' in en/ tree in rev 1.2 -->
<!-- EN-Revision: n/a Maintainer: cortesi Status: ready -->
<!-- OLD-Revision: 1.60/EN.1.2 -->
<refentry xml:id="function.openlog" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>openlog</refname>
<refpurpose>Apre una connessione al logger di sistema</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizione</title>
<methodsynopsis>
<type>int</type><methodname>openlog</methodname>
<methodparam><type>string</type><parameter>ident</parameter></methodparam>
<methodparam><type>int</type><parameter>option</parameter></methodparam>
<methodparam><type>int</type><parameter>facility</parameter></methodparam>
</methodsynopsis>
<para>
<function>openlog</function> apre una connessione al logger di
sistema per un programma. La stringa <parameter>ident</parameter> viene
aggiunta a ogni messaggio. Valori per <parameter>option</parameter>
e <parameter>facility</parameter> sono dati di seguito.
L'argomento <parameter>option</parameter> viene usato per indicare
quali opzioni di loggin verranno usate durante la generazione di un messaggio di log.
L'argomento <parameter>facility</parameter> viene usato per specificare quale
tipo di programma sta loggando il messaggio. Questo permette di specificare
(nella comfigurazione del syslog della macchina) come trattare i messaggi provenienti dalle
diverse facility.
L'uso di <function>openlog</function> è opzionale. Viene
chiamato automaticamente da <function>syslog</function> se
necessario, in tal caso <parameter>ident</parameter> sarà di default
&false;.
</para>
<para>
<table>
<title>Opzioni di <function>openlog</function></title>
<tgroup cols="2">
<thead>
<row>
<entry>Costante</entry>
<entry>Descrizione</entry>
</row>
</thead>
<tbody>
<row>
<entry>LOG_CONS</entry>
<entry>
se si verifica un errore durante l'invio dei dati al logger di sistema,
scrive direttamente sulla console di sistema
</entry>
</row>
<row>
<entry>LOG_NDELAY</entry>
<entry>
apre immediatamente una connessione al logger
</entry>
</row>
<row>
<entry>LOG_ODELAY</entry>
<entry>
(default) ritarda l'apertura della connessione fino a quando non viene loggato
il primo messaggio
</entry>
</row>
<row>
<entry>LOG_PERROR</entry>
<entry>stampa un messaggio di log anche su standard error</entry>
</row>
<row>
<entry>LOG_PID</entry>
<entry>include il PID in ciascun messaggio</entry>
</row>
</tbody>
</tgroup>
</table>
Si possono usare una o più di queste opzioni. Usando opzioni multiple
è necessario usare <literal>OR</literal>, ad esempio per aprire la connessione
immediatamente, scrivere sulla console e il PID in ciascun messaggio,
si dovrà usare: <literal>LOG_CONS | LOG_NDELAY | LOG_PID</literal>
</para>
<para>
<table>
<title>Facility di <function>openlog</function></title>
<tgroup cols="2">
<thead>
<row>
<entry>Costante</entry>
<entry>Descrizione</entry>
</row>
</thead>
<tbody>
<row>
<entry>LOG_AUTH</entry>
<entry>
messaggi di sicurezza/autorizzazione (usa LOG_AUTHPRIV
nei sistemi dove è definita quella costante)
</entry>
</row>
<row>
<entry>LOG_AUTHPRIV</entry>
<entry>messaggi di sicurezza/autorizzazione (private)</entry>
</row>
<row>
<entry>LOG_CRON</entry>
<entry>clock daemon (cron e at)</entry>
</row>
<row>
<entry>LOG_DAEMON</entry>
<entry>altri demoni di sistema</entry>
</row>
<row>
<entry>LOG_KERN</entry>
<entry>messaggi del kernel</entry>
</row>
<row>
<entry>LOG_LOCAL0 ... LOG_LOCAL7</entry>
<entry>riservato per il locale</entry>
</row>
<row>
<entry>LOG_LPR</entry>
<entry>sottosistema line printer</entry>
</row>
<row>
<entry>LOG_MAIL</entry>
<entry>sottosistema mail</entry>
</row>
<row>
<entry>LOG_NEWS</entry>
<entry>sottosistema news di USENET</entry>
</row>
<row>
<entry>LOG_SYSLOG</entry>
<entry>messaggi generati internamente da syslogd</entry>
</row>
<row>
<entry>LOG_USER</entry>
<entry>messaggi generici user-level</entry>
</row>
<row>
<entry>LOG_UUCP</entry>
<entry>sottosistema UUCP</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
Vedere anche <function>define_syslog_variables</function>,
<function>syslog</function> e
<function>closelog</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->