PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

MongoLog::setLevel

(PECL mongo >= 1.2.3)

MongoLog::setLevelSets logging level

Description

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.

Parameters

level

The levels you would like to log.

PHP Manual