php-doc-en/reference/mongo/mongolog/setlevel.xml
Kristina Chodorow 7e972c30de added MongoLog class
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@315037 c90b9560-bf6c-de11-be94-00142212c4b1
2011-08-16 21:12:29 +00:00

86 lines
2.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="mongolog.setlevel" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoLog::setLevel</refname>
<refpurpose>Sets logging level</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type>void</type><methodname>MongoLog::setLevel</methodname>
<methodparam><type>int</type><parameter>level</parameter></methodparam>
</methodsynopsis>
<para>
This function can be used to set how verbose logging should be and the types
of activities that should be logged. Use the constants described in the
<classname>MongoLog</classname> section with bitwise operators to specify
levels.
</para>
<programlisting role="php">
<![CDATA[
<?php
// first, turning on logging for a module
MongoLog::setModule(MongoLog::POOL);
// log messages of every level
MongoLog::setLevel(MongoLog::ALL);
// log warnings and info
MongoLog::setLevel(MongoLog::WARNING|MongoLog::INFO);
// log everything except fine activity
MongoLog::setLevel(MongoLog::ALL & (~MongoLog::FINE));
?>
]]>
</programlisting>
<para>
Note that you must also call <function>MongoLog::setModule</function> to
choose what part of the driver to log.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term>
<parameter>level</parameter>
</term>
<listitem>
<para>
The levels you would like to log.
</para>
</listitem>
</varlistentry>
</variablelist>
</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
-->