Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store


(PECL mongo >= 1.2.3)

MongoLog::getModuleGets the modules currently being logged


public static int MongoLog::getModule ( void )

This function can be used to see which parts of the driver's functionality are being logged. Use the constants described in the MongoLog section with bitwise operators to check if specific modules are being logged.


if (MongoLog::getModule() & MongoLog::RS) {
"logging replica sets\n";

if (
MongoLog::getModule() ^ MongoLog::NONE) {
"logging something\n";

if ((
MongoLog::getModule() & MongoLog::IO) == 0) {
"not logging io\n";



This function has no parameters.

Return Values

Returns the modules currently being logged.

PHP Manual