MongoLog::setLevel
(PECL mongo >= 1.2.3)
MongoLog::setLevel — Sets logging level
Описание
public static void MongoLog::setLevel
( int
$level
)This function can be used to set how verbose logging should be and the types of activities that should be logged. Use the constants described in the MongoLog section with bitwise operators to specify levels.
<?php
// first, turning on logging for a module
MongoLog::setModule(MongoLog::POOL);
// log messages of every level
MongoLog::setLevel(MongoLog::ALL);
// log warnings and info
MongoLog::setLevel(MongoLog::WARNING|MongoLog::INFO);
// log everything except fine activity
MongoLog::setLevel(MongoLog::ALL & (~MongoLog::FINE));
?>
Note that you must also call MongoLog::setModule() to choose what part of the driver to log.
Список параметров
-
level
-
The levels 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