mirror of
https://github.com/php/doc-it.git
synced 2026-03-24 07:32:12 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314552 c90b9560-bf6c-de11-be94-00142212c4b1
176 lines
5.6 KiB
XML
176 lines
5.6 KiB
XML
<?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
|
|
-->
|