MongoLog::getModule
(PECL mongo >= 1.2.3)
MongoLog::getModule — Gets 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.
- 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