<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.network.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.openlog.php',
    1 => 'openlog',
    2 => 'Ouvre la connexion &agrave; l\'historique syst&egrave;me',
  ),
  'up' => 
  array (
    0 => 'ref.network.php',
    1 => 'Fonctions r&eacute;seaux',
  ),
  'prev' => 
  array (
    0 => 'function.net-get-interfaces.php',
    1 => 'net_get_interfaces',
  ),
  'next' => 
  array (
    0 => 'function.pfsockopen.php',
    1 => 'pfsockopen',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/network/functions/openlog.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openlog" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openlog</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openlog</span> &mdash; <span class="dc-title">Ouvre la connexion à l&#039;historique système</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openlog-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openlog</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$prefix</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$facility</code></span>): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openlog()</strong></span> ouvre la connexion à l&#039;historique
   système.
  </p>
  <p class="para">
   L&#039;utilisation de <span class="function"><strong>openlog()</strong></span> est optionnelle. Cette
   fonction sera automatiquement appelée par la fonction <span class="function"><a href="function.syslog.php" class="function">syslog()</a></span>
   si nécessaire, auquel cas <code class="parameter">prefix</code> vaudra par défaut
   la chaîne vide.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openlog-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">prefix</code></dt>
     <dd>
      <p class="para">
       La chaîne <code class="parameter">prefix</code> sera
       ajoutée à chaque message.
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       Masque de bits des constantes suivantes :
       <ul class="simplelist">
        <li><strong><code><a href="network.constants.php#constant.log-cons">LOG_CONS</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-ndelay">LOG_NDELAY</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-odelay">LOG_ODELAY</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-nowait">LOG_NOWAIT</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-perror">LOG_PERROR</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-pid">LOG_PID</a></code></strong></li>
       </ul>
      </p>
     </dd>
    
    
     <dt><code class="parameter">facility</code></dt>
     <dd>
      <p class="para">
       L&#039;argument <code class="parameter">facility</code> est utilisé pour spécifier
       le type de programme qui enregistre le message.
       Cela permet au fichier de configuration de spécifier que les messages provenant de différentes
       installations seront traités différemment.
       Doit être l&#039;une des constantes suivantes :
       <ul class="simplelist">
        <li><strong><code><a href="network.constants.php#constant.log-auth">LOG_AUTH</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-authpriv">LOG_AUTHPRIV</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-cron">LOG_CRON</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-daemon">LOG_DAEMON</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-kern">LOG_KERN</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-local0">LOG_LOCAL<span class="replaceable">[0-7]</span></a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-lpr">LOG_LPR</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-mail">LOG_MAIL</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-news">LOG_NEWS</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-syslog">LOG_SYSLOG</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-user">LOG_USER</a></code></strong></li>
        <li><strong><code><a href="network.constants.php#constant.log-uucp">LOG_UUCP</a></code></strong></li>
       </ul>
      </p>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <span class="simpara">
        Ce paramètre est ignoré sur Windows.
       </span>
      </p></blockquote>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openlog-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne toujours <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openlog-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.2.0</td>
      <td>
       La fonction retourne maintenant toujours <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>. Auparavant, elle renvoyait <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> en cas d&#039;échec.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.openlog-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.syslog.php" class="function" rel="rdfs-seeAlso">syslog()</a> - G&eacute;n&egrave;re un message dans l'historique syst&egrave;me</span></li>
    <li><span class="function"><a href="function.closelog.php" class="function" rel="rdfs-seeAlso">closelog()</a> - Ferme la connexion &agrave; l'historique syst&egrave;me</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>