MongoLog
在线手册:中文 英文
PHP手册

MongoLog::getModule

(No version information available, might only be in SVN)

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.

<?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";
}

?>

参数

此函数没有参数。

返回值

Returns the modules currently being logged.


MongoLog
在线手册:中文 英文
PHP手册