The MongoLog class

(PECL mongo >=1.2.3)

Introduction

Logging can be used to get detailed information about what the driver is
doing. Logging is disabled by default, but this class allows you to activate
specific levels of logging for various parts of the driver. Some examples:

<?php

// print every log message possibleMongoLog::setLevel(MongoLog::ALL); // all log levelsMongoLog::setModule(MongoLog::ALL); // all parts of the driver

By default, MongoLog emits all log messages as PHP notices. Depending
on the SAPI you use, messages may be sent to
stderr (for CLI) or the web server's
error log. If, after configuring MongoLog, log messages are not appearing
as expected, ensure that the E_NOTICE bit is included
in error_reporting and that
display_errors is on.