Please wait while we load your page...
 

Announcements

PHP Manual :: MongoLog::getModule



MongoLog::getLevel || MongoLog::setCallback || MongoLog || PHP Manual

(PECL mongo >= 1.2.3)

MongoLog::getModuleGets the module(s) currently being logged

Description

public static int MongoLog::getModule ( void )

This function can be used to see which driver modules are currently being logged. The returned integer may be compared with the MongoLog module constants using bitwise operators to check if specific modules are being logged.

<?php

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

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

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

?>

Parameters

This function has no parameters.

Return Values

Returns the module(s) currently being logged.



MongoLog::getLevel || MongoLog::setCallback || MongoLog || PHP Manual
Live Chat Not Available