<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id="mongolog.setmodule" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>MongoLog::setModule</refname> <refpurpose>Sets driver functionality to log</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <modifier>public</modifier> <modifier>static</modifier> <type>void</type><methodname>MongoLog::setModule</methodname> <methodparam><type>int</type><parameter>module</parameter></methodparam> </methodsynopsis> <para> This function can be used to set which parts of the driver's functionality should be logged. Use the constants described in the <classname>MongoLog</classname> section with bitwise operators to specify modules. </para> <programlisting role="php"> <![CDATA[ <?php // first, turning up the logging level MongoLog::setLevel(MongoLog::ALL); // log replica set activity MongoLog::setModule(MongoLog::RS); // log replica sets and connection pooling MongoLog::setModule(MongoLog::RS|MongoLog::ALL); // log everything except IO activity MongoLog::setModule(MongoLog::ALL & (~MongoLog::IO)); ?> ]]> </programlisting> <para> Note that you must also call <function>MongoLog::setLevel</function> to turn on logging. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term> <parameter>module</parameter> </term> <listitem> <para> The module(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 -->