MongoLog::setModule
(PECL mongo >= 1.2.3)
MongoLog::setModule — Sets driver functionality to log
Description
public static void MongoLog::setModule
( int
$module
)This function can be used to set which parts of the driver's functionality should be logged. Use the constants described in the MongoLog section with bitwise operators to specify modules.
<?php
// first, turning up the logging level
MongoLog::setLevel(MongoLog::ALL);
// log replica set activity
MongoLog::setModule(MongoLog::RS);
// log replica sets and connection pooling
MongoLog::setModule(MongoLog::RS|MongoLog::ALL);
// log everything except IO activity
MongoLog::setModule(MongoLog::ALL & (~MongoLog::IO));
?>
Note that you must also call MongoLog::setLevel() to turn on logging.
Parameters
-
module
-
The module(s) you would like to log.
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с базами данных
- Расширения для работы с базами данных отдельных производителей
- MongoDB
- Дополнительно
- Функция MongoLog::getCallback() - Retrieve the previously set callback function name
- Функция MongoLog::getLevel() - Gets the log level
- Функция MongoLog::getModule() - Gets the modules currently being logged
- Функция MongoLog::setCallback() - Set a callback function to be called on events
- Функция MongoLog::setLevel() - Sets logging level
- Функция MongoLog::setModule() - Sets driver functionality to log
Коментарии
404 Not Found