<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="seaslog.closeloggerstream" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>SeasLog::closeLoggerStream</refname>
  <refpurpose>Manually release stream flow from logger</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <modifier>static</modifier> <type>bool</type><methodname>SeasLog::closeLoggerStream</methodname>
   <methodparam><type>int</type><parameter>model</parameter></methodparam>
   <methodparam><type>string</type><parameter>logger</parameter></methodparam>
  </methodsynopsis>
  <para>
   Manually release stream flow from logger.
   SeasLog caches the stream handle opened by the log logger to save the overhead of creating a stream. The handle will be automatically released at the end of the request.
   If in CLI mode, the process will also automatically release when it exits. Or you can use the following functions to manually release(manually release function needs to update SeasLog 1.8.6 or updated version).
  </para>

 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>model</parameter></term>
    <listitem>
     <para>
      Constant int.
      <simplelist>
       <member><link linkend="constant.seaslog-close-logger-stream-mod-all">SEASLOG_CLOSE_LOGGER_STREAM_MOD_ALL</link></member>
       <member><link linkend="constant.seaslog-close-logger-stream-mod-assign">SEASLOG_CLOSE_LOGGER_STREAM_MOD_ASSIGN</link></member>
      </simplelist>
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>logger</parameter></term>
    <listitem>
     <para>
      The logger name.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Return TRUE on released stream flow success, FALSE on failure.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <example>
   <title><methodname>SeasLog::closeLoggerStream</methodname> example</title>
   <programlisting role="php">
<![CDATA[
<?php

var_dump(SeasLog::closeLoggerStream());
var_dump(SeasLog::closeLoggerStream(SEASLOG_CLOSE_LOGGER_STREAM_MOD_ALL));
var_dump(SeasLog::closeLoggerStream(SEASLOG_CLOSE_LOGGER_STREAM_MOD_ASSIGN, 'logger_name'));

?>
]]>
   </programlisting>
   &example.outputs.similar;
   <screen>
<![CDATA[

bool(true)
bool(true)
bool(true)

]]>
   </screen>
  </example>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <simplelist>
   <member><methodname>SeasLog::setLogger</methodname></member>
   <member><methodname>SeasLog::getLastLogger</methodname></member>
  </simplelist>
 </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
-->
