mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

Replace reference to deprecated MongoLog constants. Fix typing docs in callback pages and add PHP version requirement to getCallback(). Make language consistent between the getter/setter method docs. https://jira.mongodb.org/browse/PHP-1162 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334511 c90b9560-bf6c-de11-be94-00142212c4b1
85 lines
2.2 KiB
XML
85 lines
2.2 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 the level(s) to be logged</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 control logging verbosity and the types of
|
|
activities that should be logged. The
|
|
<link linkend="mongolog.constants.level">MongoLog level constants</link>
|
|
may be used with bitwise operators to specify multiple levels.
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// first, specify a logging module
|
|
MongoLog::setModule(MongoLog::CON);
|
|
|
|
// log messages for every level
|
|
MongoLog::setLevel(MongoLog::ALL);
|
|
|
|
// log warning and info messages only
|
|
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
|
|
specify which modules(s) of the driver should log.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>
|
|
<parameter>level</parameter>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
The level(s) 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
|
|
-->
|