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

<phpdoc:classref xml:id="class.mongodb-driver-monitoring-logsubscriber" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">

 <title>The MongoDB\Driver\Monitoring\LogSubscriber interface</title>
 <titleabbrev>MongoDB\Driver\Monitoring\LogSubscriber</titleabbrev>

 <partintro>

<!-- {{{ MongoDB\Driver\Monitoring\LogSubscriber intro -->
  <section xml:id="mongodb-driver-monitoring-logsubscriber.intro">
   &reftitle.intro;
   <para>
    Classes implementing this interface may be registered as a subscriber and
    receive log messages from the driver. This is similar to stream-based debug
    logging (i.e. <link linkend="ini.mongodb.debug">mongodb.debug</link>) except
    that trace-level log messages are <emphasis>not</emphasis> received.
   </para>
   <para>
    As with stream-based logging, it is only possible to register a logger
    globally using <function>MongoDB\Driver\Monitoring\addSubscriber</function>.
    The driver is not able to distinguish log messages for individual
    <classname>MongoDB\Driver\Manager</classname> objects.
   </para>
  </section>
<!-- }}} -->

  <section xml:id="mongodb-driver-monitoring-logsubscriber.synopsis">
   &reftitle.interfacesynopsis;

<!-- {{{ Synopsis -->
   <classsynopsis>
    <ooclass><classname>MongoDB\Driver\Monitoring\LogSubscriber</classname></ooclass>

<!-- {{{ Class synopsis -->
    <classsynopsisinfo>
     <ooclass>
      <classname>MongoDB\Driver\Monitoring\LogSubscriber</classname>
     </ooclass>

     <oointerface>
      <interfacename>MongoDB\Driver\Monitoring\Subscriber</interfacename>
     </oointerface>
    </classsynopsisinfo>
<!-- }}} -->

    <classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="mongodb-driver-monitoring-logsubscriber.constants.level-error">MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_ERROR</varname>
     <initializer>0</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="mongodb-driver-monitoring-logsubscriber.constants.level-critical">MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_CRITICAL</varname>
     <initializer>1</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="mongodb-driver-monitoring-logsubscriber.constants.level-warning">MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_WARNING</varname>
     <initializer>2</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="mongodb-driver-monitoring-logsubscriber.constants.level-message">MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_MESSAGE</varname>
     <initializer>3</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="mongodb-driver-monitoring-logsubscriber.constants.level-info">MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_INFO</varname>
     <initializer>4</initializer>
    </fieldsynopsis>
    <fieldsynopsis>
     <modifier>const</modifier>
     <type>int</type>
     <varname linkend="mongodb-driver-monitoring-logsubscriber.constants.level-debug">MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_DEBUG</varname>
     <initializer>5</initializer>
    </fieldsynopsis>

    <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
    <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodb-driver-monitoring-logsubscriber')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
   </classsynopsis>
<!-- }}} -->

  </section>

<!-- {{{ MongoDB\BSON\Binary constants -->
  <section xml:id="mongodb-driver-monitoring-logsubscriber.constants">
   &reftitle.constants;
   <variablelist>
    <varlistentry xml:id="mongodb-driver-monitoring-logsubscriber.constants.level-error">
     <term><constant>MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_ERROR</constant></term>
     <listitem>
      <para>
       Error log level. An error condition that the driver is unable to report
       through its API. This is the most severe log level in the driver.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-monitoring-logsubscriber.constants.level-critical">
     <term><constant>MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_CRITICAL</constant></term>
     <listitem>
      <para>
       Critical log level. An error condition with slightly less severity. This
       constant exists for consistency with libmongoc; however, the driver is
       unlikely to use it in practice.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-monitoring-logsubscriber.constants.level-warning">
     <term><constant>MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_WARNING</constant></term>
     <listitem>
      <para>
       Warning log level. Indicates a situation where undesirable application
       behavior may occur.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-monitoring-logsubscriber.constants.level-message">
     <term><constant>MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_MESSAGE</constant></term>
     <listitem>
      <para>
       Message or notice log level. Indicates an event that is unusual but not
       problematic.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-monitoring-logsubscriber.constants.level-info">
     <term><constant>MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_INFO</constant></term>
     <listitem>
      <para>
       Info log level. High-level information about normal driver behavior.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry xml:id="mongodb-driver-monitoring-logsubscriber.constants.level-debug">
     <term><constant>MongoDB\Driver\Monitoring\LogSubscriber::LEVEL_DEBUG</constant></term>
     <listitem>
      <para>
       Debug log level. Detailed information that may be helpful when debugging
       an application.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </section>
<!-- }}} -->
 </partintro>

   &reference.mongodb.mongodb.driver.monitoring.entities.logsubscriber;

</phpdoc:classref>

<!-- 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
-->
