Php/docs/mongolog.setmodule

来自菜鸟教程
跳转至:导航、​搜索

MongoLog::setModule

(PECL mongo >= 1.2.3)

MongoLog::setModuleSets the module(s) to be logged


说明

public static MongoLog::setModule ( int $module ) : void

This function can be used to set which driver modules should be logged. The MongoLog module constants may be used with bitwise operators to specify multiple modules.

<?php// first, specify a logging levelMongoLog::setLevel(MongoLog::ALL);// log replica set activityMongoLog::setModule(MongoLog::RS);// log replica sets and connection activityMongoLog::setModule(MongoLog::RS|MongoLog::CON);// log everything except IO activityMongoLog::setModule(MongoLog::ALL & (~MongoLog::IO));?>

Note that you must also call MongoLog::setLevel() to enable logging.


参数

module
The module(s) you would like to log.