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

<refentry xml:id="seaslog.warning" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>SeasLog::warning</refname>
  <refpurpose>Record warning log information</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <modifier>static</modifier> <type>bool</type><methodname>SeasLog::warning</methodname>
   <methodparam><type>string</type><parameter>message</parameter></methodparam>
   <methodparam choice="opt"><type>array</type><parameter>content</parameter></methodparam>
   <methodparam choice="opt"><type>string</type><parameter>logger</parameter></methodparam>
  </methodsynopsis>
  <para>
    Record warning log information.
    <note>
      <para>
        "WARNING" - Exceptional occurrences that are not errors.
        Potentially aberrant information that needs attention and needs to be repaired.
      </para>
    </note>
  </para>

 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>message</parameter></term>
    <listitem>
     <para>
      The log message.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>content</parameter></term>
    <listitem>
     <para>
      The `message` contain placeholders which implementors replace with values from content array.
      Sush as `message` is `log info  from {NAME}` and `content` is `array('NAME' => neeke)`,
      the log information will `log info from neeke`.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>logger</parameter></term>
    <listitem>
     <para>
      The `logger` cased by the third param would be used right this right now, 
      like a temp logger, when the function SeasLog::setLogger() called in pre content.
      If `logger` NULL or "", SeasLog will use lastest logger setted by <methodname>SeasLog::setLogger</methodname>. 
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Return TRUE on record log information success, FALSE on failure.
  </para>
 </refsect1>

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

var_dump(SeasLog::warning('log message'));

//with content
var_dump(SeasLog::warning('log message from {NAME}',array('NAME' => 'neeke')));

//with tmp logger
var_dump(SeasLog::warning('log message from {NAME}',array('NAME' => 'neeke'),'tmp_logger'));

var_dump(SeasLog::getBuffer());

?>
]]>
   </programlisting>
   &example.outputs.similar;
   <screen>
<![CDATA[
bool(true)
bool(true)
bool(true)
array(2) {
  ["/var/log/www/default/20180707.log"]=>
  array(2) {
    [0]=>
    string(81) "2018-07-07 11:45:49 | WARNING | 73263 | 5b40376d1067c | 1530935149.68 | log message
"
    [1]=>
    string(92) "2018-07-07 11:45:49 | WARNING | 73263 | 5b40376d1067c | 1530935149.68 | log message from neeke
"
  }
  ["/var/log/www/tmp_logger/20180707.log"]=>
  array(1) {
    [0]=>
    string(92) "2018-07-07 11:45:49 | WARNING | 73263 | 5b40376d1067c | 1530935149.68 | log message from neeke
"
  }
}
]]>
   </screen>
  </example>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <simplelist>
   <member><link linkend="ini.seaslog.default-template">seaslog.default_template</link></member>
   <member><methodname>SeasLog::debug</methodname></member>
   <member><methodname>SeasLog::info</methodname></member>
   <member><methodname>SeasLog::notice</methodname></member>
   <member><methodname>SeasLog::error</methodname></member>
   <member><methodname>SeasLog::critical</methodname></member>
   <member><methodname>SeasLog::alert</methodname></member>
   <member><methodname>SeasLog::emergency</methodname></member>
   <member><methodname>SeasLog::log</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
-->
