downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

MongoLog::setCallback> <MongoLog::getLevel
[edit] Last updated: Fri, 14 Jun 2013

view this page in

MongoLog::getModule

(PECL mongo >= 1.2.3)

MongoLog::getModuleGets the modules currently being logged

Description

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.

<?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 modules currently being logged.



add a note add a note User Contributed Notes MongoLog::getModule - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites