<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.openlog.php',
    1 => 'openlog',
    2 => 'Stellt eine Verbindung zum Log-Dienst des Systems her',
  ),
  'up' => 
  array (
    0 => 'ref.network.php',
    1 => 'Netzwerk-Funktionen',
  ),
  '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' => 'de',
    '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">Stellt eine Verbindung zum Log-Dienst des Systems her</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openlog-description">
  <h3 class="title">Beschreibung</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">
   Die Funktion <span class="function"><strong>openlog()</strong></span> öffnet eine Verbindung zum
   System-Log-Dienst eines Programmes.
  </p>
  <p class="para">
   Die Verwendung von <span class="function"><strong>openlog()</strong></span> ist optional. Die Funktion
   wird - falls erforderlich - automatisch von <span class="function"><a href="function.syslog.php" class="function">syslog()</a></span>
   aufgerufen, dabei wird <code class="parameter">prefix</code> standardmäßig mit
   der leeren Zeichenkette belegt.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openlog-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">prefix</code></dt>
     <dd>
      <p class="para">
       Die Zeichenkette <code class="parameter">prefix</code> wird jeder Meldung
       hinzugefügt.
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       Eine Bitmaske der folgenden Konstanten:
       <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">
       Das Argument <code class="parameter">facility</code> wird verwendet, um die Art
       des Programmes festzulegen, das die Nachricht loggt.
       Damit kann in der Konfigurationsdatei festgelegt werden, dass
       Nachrichten von verschiedenen Einrichtungen unterschiedlich behandelt
       werden.
       Muss eine der folgenden Konstanten sein:
       <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">Hinweis</strong>: 
       <span class="simpara">
        Unter Windows wird dieser Parameter ignoriert.
       </span>
      </p></blockquote>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openlog-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt immer <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück.
  </p>
 </div>


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

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.2.0</td>
      <td>
       Die Funktion gibt nun immer <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück; zuvor gab sie bei einem
       Fehler <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurück.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.openlog-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.syslog.php" class="function" rel="rdfs-seeAlso">syslog()</a> - Erzeugt eine Meldung f&uuml;r das System-Log</span></li>
    <li><span class="function"><a href="function.closelog.php" class="function" rel="rdfs-seeAlso">closelog()</a> - Schlie&szlig;t die Verbindung zum System-Logger</span></li>
   </ul>
  </p>
 </div>


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